|
Submitted By: shmibs Date: June 14, 2011, 03:13:08 pm Views: 741 | |||
/\as builder said five months ago(earlier in this topic), the only way to know for sure if there will be any size improvements is to test it out. as for ralphdspam's question: i'm not entirely sure what it is you're asking (and i'm sure that somebody else will likely have a question about other things at some point), so ima just go through a quick explanation of huffman. Simple Huffman compression is very easy to read and write. Firstly go through the data you wish to compress and determine, in order, the number of times each byte value appears(this can be done with two+ byte numbers as well, I suppose, but you aren't likely to gain any space from it). Once you have these values, store them in a lookup table which will be accessed by your compressor/decompressor later on. Reading and writing are then very simple, if you choose to use the quick and easy method: each of your byte values will be stored in your compressed data, not as fixed length chunks, but as variable length, null-terminated strings of bits. This means that, to your decompressor 10 will read as byte value number one in your look-up table, 110 will read as the second, 1110 as the third, and so on. Now, this works very well for data which isn't very diverse in values, chunk number one taking only |
|||
Rating: This article has not been rated yet. |
|||
|