RE: ideas on "reversing" the process for deflate code?

Bill Davis <[email protected]> Thu, 4 Sep 2003 16:15:13 -0500
Newsgroups gmane.lisp.open-source.franz
Message-ID <[email protected]>
Was just wondering if it was a feasible idea to "invert" your original
routines like process-huffman-block to implement the "deflate" version
(i.e., how much of the other infrastructure in your original source could
stay relatively the same), and then of course whether anyone had done so.  

-----Original Message-----
From: John Foderaro [mailto:[email protected]] 
Sent: Thursday, September 04, 2003 3:48 PM
To: Bill Davis
Cc: [email protected]
Subject: Re: ideas on "reversing" the process for deflate code? 


 There are two decisions you have to make when deflating: 

1. how big a chunk of data should I try to deflate at once?

2. should I create my own custom huffman table or use the built-in one?

 You can simplify things by always choosing, say,  a 2k block to compress
and by always using the built-in huffman table (or emiting a noncompressed
block if compressing with the built in table resulted in a growth
rather than a shrinkage).   This is sub-optimal
but would still give you some compression.