Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.apple2.programmer > #980

RE: LZW decompressor

From Mark P M Lim <marklim@macgui.com>
Newsgroups comp.sys.apple2.programmer
Subject RE: LZW decompressor
Date 2013-11-23 02:31 +0000
Organization Mac GUI
Message-ID <marklim-1385173911@macgui.com> (permalink)
References <marklim-1383903408@macgui.com> <dog_cow-1384022046@macgui.com> <marklim-1384051053@macgui.com>

Show all headers | View raw


Hi,

After spending sometime looking at the various LZW programs on the Internet,
I think I have located the bug that prevents the ShrinkIt decompressor
method UnpackLZW() from decoding correctly.

Right at the top of the method DecompressorError
DecompressorShrinkIt::UnpackLZW() is the following code snippet:

          ................

	while (! putByteErr)
	{
		if (GotClearCode())
		{
			SetGotClearCode(false);			
			SetAtBit(0);					
			SetCurrentEntry(0x0101);

          ................

Commenting out the statement SetAtBit(0) allows an entire archived text file
to be decoded correctly.

However, the CRC of the uncompressed data (fCRC16.CRCword.crc) does not
tally with fOriginalCRC.

Regards.

Mark

Back to comp.sys.apple2.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

RE: LZW decompressor Mark P M Lim <marklim@macgui.com> - 2013-11-08 09:36 +0000
  RE: LZW decompressor D Finnigan <dog_cow@macgui.com> - 2013-11-09 18:34 +0000
    RE: LZW decompressor Mark P M Lim <marklim@macgui.com> - 2013-11-10 02:37 +0000
      RE: LZW decompressor Mark P M Lim <marklim@macgui.com> - 2013-11-23 02:31 +0000
        Re: LZW decompressor markpmlim@yahoo.com.sg - 2013-12-24 18:51 -0800
          Re: LZW decompressor Mark P M Lim <marklim@macgui.com> - 2013-12-28 01:51 +0000
  Re: LZW decompressor denisbytezone@gmail.com - 2014-03-20 00:37 -0700
    Re: LZW decompressor Mark P M Lim <markpmlim@yahoo.com.sg> - 2014-03-20 22:28 +0000
      Re: LZW decompressor Denis Molony <denisbytezone@gmail.com> - 2014-03-21 16:26 -0700

csiph-web