summaryrefslogtreecommitdiff
path: root/deflate.c (unfollow)
Commit message (Collapse)Author
2017-05-13Factor LZ77 and Huffman routines out of deflate.c.Simon Tatham
The general routines for analysing a buffer into an LZ77ish stream of literals and matches, and for constructing a Huffman tree in canonical format, now live in their own source files so that they can be reused for other similar compression formats. Deflate-specific details like the exact file encoding are left in deflate.c.
2014-10-01Apply the same Deflate decoder fix as PuTTY r10278.Simon Tatham
This causes sensible error reporting if distance codes 30 or 31 appear in a compressed block. (Not that Halibut actually _uses_ the Deflate decoder - it only uses the encoder - but if I've got a copy of this code here then it should be correct.) [originally from svn r10280] [r10278 == 3fd8014ea7235d0ec34e8f97a34f3ecf576e8239 in putty repository]
2014-03-30Silence compiler warnings on OS X 10.9.Simon Tatham
[originally from svn r10166]
2012-06-03Patch from Maciej Adamczyk to set standard output to binary mode inSimon Tatham
the standalone deflate utility modes, so you can redirect output to a file and end up with correct data in that file. [originally from svn r9552]
2012-06-01Make the Deflate decoder correctly handle the special case of aSimon Tatham
dynamic block in which the backward-distances Huffman table contains no entries at all. (In this situation it's impossible to use the distance table, and therefore the block must contain nothing but Huffman-coded literals.) [originally from svn r9550]
2012-05-03Apply r6972 from my other copy of deflate.c: don't lose the BFINAL bitSimon Tatham
on an uncompressed block. [originally from svn r9482] [r6972 == 37af901cfe63ed062306e3835751e9b8e089e252 in misc repository]
2012-05-03Ahem. Don't invert the length _twice_.Simon Tatham
[originally from svn r9476]
2012-05-03Add an error check for correct formatting in Deflate uncompressedSimon Tatham
block headers. (Ubuntu 12.04's gcc spotted that nlen was unused, which it shouldn't have been.) [originally from svn r9475]
2008-11-21Clean up some compiler warnings.Simon Tatham
[originally from svn r8310]
2007-02-13When building the static Huffman tables, it's vital to include theSimon Tatham
two unused entries at the end of the lit/len table (286 and 287), because without them all the 9-bit codes are off by four. I can only assume I hadn't noticed this before because no test file I've compressed had both (a) contained byte values >= 0x90 and (b) required a static block. [originally from svn r7279]
2006-12-07Fix typo in limit test in deflate_buildhuf(). (The only two limitSimon Tatham
values ever used are 15 and 7, so testing against 16 is silly.) [originally from svn r6969] [this svn revision also touched misc]
2006-12-06Update deflate.c to include nearly all the changes I've been makingSimon Tatham
in the main version. The one missing thing is the fancy new LZ77 compressor in misc/libcode/lz77.c, in whose stability I'm not yet confident enough to consider it ready for prime-time. [originally from svn r6967]
2006-11-30Add support for compressed PDF streams, using Simon's new deflate library.Ben Harris
[originally from svn r6931]