]> Cypherpunks repositories - gostls13.git/commitdiff
compress/lzw: add commentary that TIFF's LZW differs from the standard
authorNigel Tao <nigeltao@golang.org>
Fri, 13 Jun 2014 07:44:29 +0000 (17:44 +1000)
committerNigel Tao <nigeltao@golang.org>
Fri, 13 Jun 2014 07:44:29 +0000 (17:44 +1000)
algorithm.

See https://golang.org/cl/105750045/ for an implementation of
TIFF's LZW.

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/102940043

src/pkg/compress/lzw/reader.go

index ef596991032f4bb14ed0b7cd60e58e53078d5480..cd90c9c63a67289b08386e3f0dad4bccaa4ab143 100644 (file)
@@ -6,12 +6,16 @@
 // described in T. A. Welch, ``A Technique for High-Performance Data
 // Compression'', Computer, 17(6) (June 1984), pp 8-19.
 //
-// In particular, it implements LZW as used by the GIF, TIFF and PDF file
+// In particular, it implements LZW as used by the GIF and PDF file
 // formats, which means variable-width codes up to 12 bits and the first
 // two non-literal codes are a clear code and an EOF code.
+//
+// The TIFF file format uses a similar but incompatible version of the LZW
+// algorithm. See the code.google.com/p/go.image/tiff/lzw package for an
+// implementation.
 package lzw
 
-// TODO(nigeltao): check that TIFF and PDF use LZW in the same way as GIF,
+// TODO(nigeltao): check that PDF uses LZW in the same way as GIF,
 // modulo LSB/MSB packing order.
 
 import (