About compressing sparse arrays
Posted: 2007-07-10, 23:05
Here are a few methods for compressing sparse byte arrays:
... Should collect real test data of a real Ca3DE session, then excercise the test data through all compression methods and all their reasonable combinations; creating stats will reveal the "best" method for our purposes...
- PackBits, http://en.wikipedia.org/wiki/PackBits
- zlib's deflation algorithm
- Huffman encoding, http://en.wikipedia.org/wiki/Huffman_coding
According to Robert Beckebans (Tr3B), this approach is also used in Q3A.
Huffman encoding seems to be a part of zlib's deflatation algorithm. - Build a binary tree that enumerates the non-zero bytes, then lists those bytes.
... Should collect real test data of a real Ca3DE session, then excercise the test data through all compression methods and all their reasonable combinations; creating stats will reveal the "best" method for our purposes...