Has anyone here looked into optimization of deflate streams inside PDFs? There are often several of them in the same file, between "stream" and "endstream" tokens, with a 1-byte header (though the next byte is, I guess, a zlib 1-byte header, so the header could be considered to be 2 bytes). (Though note that these streams are not always compressed, or can be compressed using other algorithms such as CCITT.)
(I haven't been looking into optimization of these streams, but the last couple weeks I've been looking into the opposite—decompressing these streams—and finally succeeded using zpipe and a perl script (though now I'm going to look into perl's Compress::Zlib module).)
Edited by Peter Ahlstrom at
fred01 at
Re: Optimization of deflate streams in PDFs?
You should try to contact Zardalu (a.k.a. Ben Jos), the developer of DeflOpt. He talked about developing a more generic deflate recompression utility in this thread: http://www.jonof.id.au/forum/index.php?topic=1064.msg7918#msg7918 May be you can combine your efforts. Send him a PM, as he may not visit this forum regularly.
P.S. But I would prefer this utility not being in Perl. ;D