Spin out a std/lzw package

This commit is contained in:
Nigel Tao committed 2018-06-02 14:15:09 +10:00
1 parent 3e1cdd1a83
commit 6d510bcfcb
13 files changed
+3973 -565

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
# LZW (Lempel Ziv Welch) Compression
LZW is a general purpose compression algorithm, not specific to GIF, PDF, TIFF
or even to graphics. In practice, there are two incompatible implementations,
LSB (Least Significant Bits) and MSB (Most Significant Bits) first.
The GIF format uses LSB first. The literal width can vary between 2 and 8 bits,
inclusive. There is no EarlyChange option.
The PDF and TIFF formats use MSB first. The literal width is fixed at 8 bits.
There is an EarlyChange option that PDF sometimes uses (see Table 3.7 in the
[PDF 1.4
spec](https://www.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/pdf_reference_archives/PDFReference.pdf))
and TIFF always uses.
TODO: refactor this README.md file and std/gif's one.