I'm a little confused about how to truncate the output of the LempelZiv code. It seems with a dictionary started at 0 to 255, codes (LZW codes that is...) could get quite big. I read something about limiting them to 16 bits, but I'm not sure what this means? Do we check the size of the code to make sure it doesn't go beyond that? Or are we to write our codes out as binary numbers (that doesn't seem like real compression, just because it takes fewer bits to store the number, a 0 or 1 takes up just as much file space as a 9 or 8, doesn't it?
Any help on any or all of these questions would be appreciated...
-Confused... |