-
Compression of sequences
Hello,
I have problem with compressing a sequence of binary digits.
Eg:. Consider the following sequneces ( there are indefinte number of sequences).
11001100100101100.... 256 digits
11000100011000011.... 256 digits
The problem is that I would like to compress this sequence into something more manageable say 25 digits maximum.
I tried to get the common patterns out of each sequence thereby reducing the length required...
Any suggestions...
Arun
-
HEX?
what form are the binary numbers in now?
If they are strings, why not convert to hex? Better yet, convert to radix 26, using the letters of the English alphabet. You will divide length by 16 or 26.
If they are already stored as Long or Integer variables, you probably cannot compress them much. If you have a Zip utility, try compressing a Word Processor document file and an exe file. compare the percent of compression. The exe file is basically binary data.
-
Radix?...
-
radix is the base in a numbering system, 10 is radix for decimal system, 2 for binary, 16 for hex, 8 for oct
-
radix...
...oh right. we jus called it base but radix is good.
-
Alternative bases can be used effectively, but it's a ***** to
program anything over Hex. I had to use Radix 45 once, working
on a Commodore Pet....4K of ram and no hard drive.
-
RE: compression
Hello Guv,
The problem here is that we cannot use alphabets as this compression program has to be used in an eight bit microcontroller and since there is no way of storing an alphabet directly to the memory we cannot use alphabets, the only option is to use Hex but the sequence is still quite large.
I will give you an idea of the memory structure of the Microcontroller.
FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF
(there are 16 such columns , 8x16= 128 bytes; the total space available for storage).
Each F represents 4 bits .
Is there any standard method of compressing the sequences, like say using matrices etc.
Thank you
Arun