15 January 2003

The CVS version of libmplot now supports a quick and dirty raster scaling… Looking at LZW compression because my PDF code needs it. It would appear that the Patent expires mid this year, and no Australian patent was every issued.

Like all good inventions, it’s obvious once you understand it.

Based on http://dogma.net/markn/articles/lzw/lzw.htm, the following string


Compresses to:


Where I have used the []’s to indicate code boundaries. The problem from an implementation point of view is that each code entry might flow across a byte boundary. In fact, in PDF 1.3, the codes can be 9 to 12 bits long, depending on the size of the codebook.