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

Method readFlush

flate/dict_decoder.go:184–193  ·  view source on GitHub ↗

readFlush returns a slice of the historical buffer that is ready to be emitted to the user. The data returned by readFlush must be fully consumed before calling any other dictDecoder methods.

()

Source from the content-addressed store, hash-verified

182// emitted to the user. The data returned by readFlush must be fully consumed
183// before calling any other dictDecoder methods.
184func (dd *dictDecoder) readFlush() []byte {
185 toRead := dd.hist[dd.rdPos:dd.wrPos]
186 dd.flushed += int64(len(toRead))
187 dd.rdPos = dd.wrPos
188 if dd.wrPos == len(dd.hist) {
189 dd.wrPos, dd.rdPos = 0, 0
190 dd.full = true
191 }
192 return toRead
193}
194
195// decoded reports the total number of bytes written into the dictionary since
196// init (i.e. excluding any preset dict bytes).

Callers 11

TestDictDecoderFunction · 0.95
huffmanBytesBufferMethod · 0.80
huffmanBytesReaderMethod · 0.80
huffmanBufioReaderMethod · 0.80
huffmanStringsReaderMethod · 0.80
huffmanGenericReaderMethod · 0.80
ReadMethod · 0.80
WriteToMethod · 0.80
dataBlockMethod · 0.80
copyDataMethod · 0.80
finishBlockMethod · 0.80

Calls

no outgoing calls

Tested by 1

TestDictDecoderFunction · 0.76