Dave 2 Huffman compression

From ModdingWiki
Jump to navigation Jump to search
Dave 2 Huffman compression
Format typeCompression algorithm
I/O unit size1-bit

Dangerous Dave 2 Huffman compression is the means by which most of the non-tileset graphics are compressed. (Screens and sprites.)

The file is composed of three parts, a brief header, the Huffman binary tree, and the compressed data. The 'header' consists of the string 'HUFF' followed by a dword giving the decompressed file size. The Huffman table is of the usual format, giving a fixed size of 404 bytes before the compressed data.


This format reverse engineered by User:Napalm

The Huffman Compression page has source code for producing a Huffman table in this format that doesn't decompress data, so the raw data can be copied right after it.