package lzw
Import Path
compress/lzw (on golang.org and go.dev)
Dependency Relation
imports 4 packages, and imported by one package
Involved Source Files
d-> reader.go
writer.go
Exported Type Names
Exported Values
const
LSB Order = 0
LSB means Least Significant Bits first, as used in the GIF file format.
const
MSB Order = 1
MSB means Most Significant Bits first, as used in the TIFF and PDF
file formats.
func
NewReader(r
io.
Reader, order
Order, litWidth
int)
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.
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.
func
NewWriter(w
io.
Writer, order
Order, litWidth
int)
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.
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.
 |
The pages are generated with Golds v0.1.7. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project and developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |