Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Bitstring compression

Name: Anonymous 2013-08-14 10:33

What is currently the most efficient algorithm to compress bit strings.
special requirements:
1.NO algorithms which deal with bytes/ints or some fixed chunks of N bits. Must operate on variable-length substrings of bitstring.
2.The encoding must not take more than x8 memory of bitstring memory size(either less than x8 or using a buffer).
3.encoding should be as fast as possible(no complex modeling, data context switching or similar techniques)

Name: Anonymous 2013-08-14 11:03

Well since PPM and arithmetic coding are out based on your requirements, it's going to be a lempel-ziv variant, but which totally depends on the properties of the data your are trying to compress.

Name: Anonymous 2013-08-14 12:02

Ones and zeroes right? Zeroes don't matter, so we can use that as starting point

example: 100101100110 becomes 111111
even better, we could just count the ones
so 111111 becomes 6.

Name: Anonymous 2013-08-14 12:49

>>3
72958503

Name: Anonymous 2013-08-14 13:07

just discovered some nasty endianness bug in my code which reversed bitstrings.
>>2 i'm thinking of dictionary of bitstrings of different sizes.

Name: Anonymous 2013-08-14 22:06

This isn't a very good question, because in order to really give an answer we need to know something about the data.  For example, consider the metric for algorithm quality S = min{ |Q| - |TQ| }  (for Q a bitstring, TQ the transform of the bitstring, and |A| the length of A in bits)  - by the Pidgeonhole principle, for almost any transform T, there is at least one input Q that results in a larger output TQ, therefore S is negative.

For the identity `compression' algorithm IQ = Q, however, S = 0, which is the greatest possible S for any compression algorithm. To apply OP's criteria, I deals with arbitrary length bitstrings fine, uses 1x the memory of Q (or constant 0 memory, depending on how you count), and has O(1) time (!).  However, I really doubt that this is the algorithm OP wants, even though for a particular, non-pathological measurement I is the best algorithm.

Name: Anonymous 2013-08-14 22:10

What you need to do is assign a number to every possible bitstring.
Then, instead of storing the bits you store the number!

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List