go1.20.5
GoThrough

lzw.LSB

// LSB means Least Significant Bits first, as used in the GIF file format. const LSB = iota

lzw.MSB

// MSB means Most Significant Bits first, as used in the TIFF and PDF // file formats. const MSB = iota

lzw.NewReader

// NewReader creates a new io.ReadCloser. // Reads from the returned io.ReadCloser read and decompress data from r. // If r does not also implement io.ByteReader, // the decompressor may read more data than necessary from r. // It is the caller's responsibility to call Close on the ReadCloser when // finished reading. // The number of bits to use for literal codes, litWidth, must be in the // range [2,8] and is typically 8. It must equal the litWidth // used during compression. // // It is guaranteed that the underlying type of the returned io.ReadCloser // is a *Reader. func NewReader(r io.Reader, order Order, litWidth int) io.ReadCloser

lzw.NewWriter

// NewWriter creates a new io.WriteCloser. // Writes to the returned io.WriteCloser are compressed and written to w. // It is the caller's responsibility to call Close on the WriteCloser when // finished writing. // The number of bits to use for literal codes, litWidth, must be in the // range [2,8] and is typically 8. Input bytes must be less than 1<<litWidth. // // It is guaranteed that the underlying type of the returned io.WriteCloser // is a *Writer. func NewWriter(w io.Writer, order Order, litWidth int) io.WriteCloser