Documentation ¶
Overview ¶
Package lzw is an enhanced version of compress/lzw.
It implements Adobe's PDF lzw compression as defined for the LZWDecode filter and is also compatible with the TIFF file format.
See the golang proposal: https://github.com/golang/go/issues/25409.
More information: https://github.com/hhrutter/pdfcpu/tree/master/lzw
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewReader ¶
func NewReader(r io.Reader, oneOff bool) io.ReadCloser
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. oneOff makes code length increases occur one code early. It should be true for LZWDecode filters with earlyChange=1 which is also the default.
func NewWriter ¶
func NewWriter(w io.Writer, oneOff bool) io.WriteCloser
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. oneOff makes code length increases occur one code early. It should be true for LZWDecode filters with earlyChange=1 which is also the default.
Types ¶
This section is empty.