pdf-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pdf-devel] Bug in LZW filter?


From: Georg Gottleuber
Subject: Re: [pdf-devel] Bug in LZW filter?
Date: Sat, 17 Sep 2011 16:03:48 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.2.20) Gecko/20110903 Lightning/1.0b2 Lanikai/3.1.12

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

On 03.09.2011 22:46, Aleksander Morgado wrote:
> Great, good catch. Would it be possible to have some unit test for this
> specific issue as well?

I made some test files and added these to the unit test. It showed up,
that the encoder was broken too (because they work symmetrical).

Additional tests showed that encoding with EarlyChange = 0 (very
unusual) needs a bigger table (LZW_MAX_DICTSIZE + 1). I have done a lot
of testing and the LZW encoder (with EarlyChange = 0) now outputs the
same files as PDFlib-Lite-5.0.4p1 does. (PDFlib-Lite-5.0.4p1 is the only
encoder with EarlyChange = 0 I found)

The attached patch contains:
* fixes in the LZW filter
* new test files
* unit test that uses the new test files

Is it desirable to include the PDF-Files (2 files with each 20KB) which
where used to extract test files TD00006..9? (ATM they are excluded from
the patch)

Regards,
Georg

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk50qMQACgkQ5sLITM1qIaL0pgCfTDSUHe3weGRRRRYOBonbdRG6
BjcAoJ70ILsBrM0/pf0Q7xdFYS1IUMTG
=9yLp
-----END PGP SIGNATURE-----

Attachment: lzw_fixes_and_unit_test_patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]