MCPcopy Index your code
hub / github.com/klauspost/compress / get32BitsFast

Method get32BitsFast

zstd/bitreader.go:60–65  ·  view source on GitHub ↗

get32BitsFast requires that at least one bit is requested every time. There are no checks if the buffer is filled.

(n uint8)

Source from the content-addressed store, hash-verified

58// get32BitsFast requires that at least one bit is requested every time.
59// There are no checks if the buffer is filled.
60func (b *bitReader) get32BitsFast(n uint8) uint32 {
61 const regMask = 64 - 1
62 v := uint32((b.value << (b.bitsRead & regMask)) >> ((regMask + 1 - n) & regMask))
63 b.bitsRead += n
64 return v
65}
66
67// fillFast() will make sure at least 32 bits are available.
68// There must be at least 4 bytes available.

Callers 3

getBitsMethod · 0.95
decodeMethod · 0.80
decodeSyncMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected