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

Struct decompressor

flate/inflate.go:310–350  ·  view source on GitHub ↗

Decompress state.

Source from the content-addressed store, hash-verified

308
309// Decompress state.
310type decompressor struct {
311 // Input source.
312 r Reader
313 roffset int64
314
315 // Huffman decoders for literal/length, distance.
316 h1, h2 huffmanDecoder
317
318 // Length arrays used to define Huffman codes.
319 bits *[maxNumLit + maxNumDist]int
320 codebits *[numCodes]int
321
322 // Output history, buffer.
323 dict dictDecoder
324
325 // Next step in the decompression,
326 // and decompression state.
327 step step
328 stepState int
329 err error
330 toRead []byte
331 hl, hd *huffmanDecoder
332 copyLen int
333 copyDist int
334
335 // Temporary buffer (avoids repeated allocation).
336 buf [4]byte
337
338 // Input bits, in top of b.
339 b uint32
340
341 nb uint
342 final bool
343
344 flushMode flushMode
345 cb func(InflateCheckpoint)
346 cp InflateCheckpoint
347 hasCP bool // WithResumeFrom was supplied
348 uncOffset int64 // baseline uncompressed offset (from a resume checkpoint)
349 cpBuf []byte
350}
351
352func (f *decompressor) nextBlock() {
353 for f.nb < 1+2 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected