MCPcopy
hub / github.com/klauspost/compress / close

Method close

zstd/bitreader.go:120–131  ·  view source on GitHub ↗

close the bitstream and returns an error if out-of-buffer reads occurred.

()

Source from the content-addressed store, hash-verified

118
119// close the bitstream and returns an error if out-of-buffer reads occurred.
120func (b *bitReader) close() error {
121 // Release reference.
122 b.in = nil
123 b.cursor = 0
124 if !b.finished() {
125 return fmt.Errorf("%d extra bits on block, should be 0", b.remain())
126 }
127 if b.bitsRead > 64 {
128 return io.ErrUnexpectedEOF
129 }
130 return nil
131}
132
133func highBits(val uint32) (n uint32) {
134 return uint32(bits.Len32(val) - 1)

Callers 5

encodeMethod · 0.45
decodeSyncSimpleMethod · 0.45
decodeMethod · 0.45
decodeMethod · 0.45
decodeSyncMethod · 0.45

Calls 2

finishedMethod · 0.95
remainMethod · 0.95

Tested by

no test coverage detected