go/src/compress/flate/inflate.go

const maxCodeLen

const maxNumLit

const maxNumDist

const numCodes

var fixedOnce

var fixedHuffmanDecoder

type CorruptInputError

func (e CorruptInputError) Error() string {}

type InternalError

func (e InternalError) Error() string {}

type ReadError

func (e *ReadError) Error() string {}

type WriteError

func (e *WriteError) Error() string {}

type Resetter

const huffmanChunkBits

const huffmanNumChunks

const huffmanCountMask

const huffmanValueShift

type huffmanDecoder

// Initialize Huffman decoding tables from array of code lengths.
// Following this function, h is guaranteed to be initialized into a complete
// tree (i.e., neither over-subscribed nor under-subscribed). The exception is a
// degenerate case where the tree has only a single symbol with length 1. Empty
// trees are permitted.
func (h *huffmanDecoder) init(lengths []int) bool {}

type Reader

type decompressor

func (f *decompressor) nextBlock() {}

func (f *decompressor) Read(b []byte) (int, error) {}

func (f *decompressor) Close() error {}

var codeOrder

func (f *decompressor) readHuffman() error {}

// Decode a single Huffman block from f.
// hl and hd are the Huffman states for the lit/length values
// and the distance values, respectively. If hd == nil, using the
// fixed distance encoding associated with fixed Huffman blocks.
func (f *decompressor) huffmanBlock() {}

// Copy a single uncompressed data block from input to output.
func (f *decompressor) dataBlock() {}

// copyData copies f.copyLen bytes from the underlying reader into f.hist.
// It pauses for reads when f.hist is full.
func (f *decompressor) copyData() {}

func (f *decompressor) finishBlock() {}

// noEOF returns err, unless err == io.EOF, in which case it returns io.ErrUnexpectedEOF.
func noEOF(e error) error {}

func (f *decompressor) moreBits() error {}

// Read the next Huffman-encoded symbol from f according to h.
func (f *decompressor) huffSym(h *huffmanDecoder) (int, error) {}

func (f *decompressor) makeReader(r io.Reader) {}

func fixedHuffmanDecoderInit() {}

func (f *decompressor) Reset(r io.Reader, dict []byte) error {}

// NewReader returns a new ReadCloser that can be used
// to read the uncompressed version of r.
// If r does not also implement [io.ByteReader],
// the decompressor may read more data than necessary from r.
// The reader returns [io.EOF] after the final block in the DEFLATE stream has
// been encountered. Any trailing data after the final block is ignored.
//
// The [io.ReadCloser] returned by NewReader also implements [Resetter].
func NewReader(r io.Reader) io.ReadCloser {}

// NewReaderDict is like [NewReader] but initializes the reader
// with a preset dictionary. The returned [Reader] behaves as if
// the uncompressed data stream started with the given dictionary,
// which has already been read. NewReaderDict is typically used
// to read data compressed by NewWriterDict.
//
// The ReadCloser returned by NewReaderDict also implements [Resetter].
func NewReaderDict(r io.Reader, dict []byte) io.ReadCloser {}