I have a program in which I create bit streams, about 80-150 bits or so, that I would like to compress, because I'm going to turn them into some kind of ASCII string so that people can transmit them.
Does anyone know of a good, free bit compress that can run on such a stream? My main problem with the "standard parameters" is that this stream really needs to be processed as bits, not bytes, otherwise the structure is lost, and their service swamps get any gain.
Addition:
The reason I want to compress these streams is because users will cut + paste them, possibly using something like base64 encoding, so it’s useful to save some data.
Here is an example for those who would like to see him. I will add formatting to make it easier to read:
110 110 - This is a 6x6 grid (the maximum is 7x7, so we only need 3 bits!)
000000
011110
010010
010010
011110
000000 - This is one layout grid
000000
000000
001000
000100
000000
000000 - This is the second layout grid
Now we will list some fragments
010 11111111 - A piece is a 3-bit colour code, then an 8-bit list of 'on / off' bits.
001 10101010 - Another bit!
001 10101010 - Another, identical bit!
The reason why I say this should be considered as “bits”, because there are obvious compression parameters, if we consider them as a bit stream (in particular, as a rule, there are many 0 in the “grid”), which disappear if you consider it a byte-stream.
source
share