Compression of array of chars
For my job's project I'm looking for efficient LOSSLESS compression algorithm .
So what I have and what I need:
data array containing chars ( numbers from 30 to 122) .A lot of patterns! Array's size is constant (and big, about 12800000 chars).
Memory usage is not very important.
Need something fast and efficient. Better if only one run over the array.
Now I use something very simple,like:
1.Run over the array.
2.If char returns more than 3 times, write to new array 0(as flag) X (char) N (number of times it returns)
3 if 2 or less, just write char's value.
It work fine, but I need to improve it (better compression and speed)
I'll be glad to get your suggestions!
Thanks a lot,
bsclib, ppmd, zlib, lz4, lzma. i suggest you to try with external programs first in order to decide what library is best for you in terms of speed/compression ratio
And also libzpaq. Test with zpaq -m3 and -m4 first. These are the mid and max (level 2 and 3) in libzpaq.