|
-
Apr 16th, 2004, 03:57 PM
#1
Thread Starter
Hyperactive Member
Dynamic Compression
Does anyone have a formula that compresses (or inflates based on what sequence of bits it is) of an 8-bit strand?
I've been trying to find a way to code it but it seams that I have to specify when-this-is-this-then-its-this routine.
Ex.
"1111 1111" is compressed into "1111"
-Starting with the first bit of 1, then if it repeats it is 1, if it repeats the 2 bits of it again then it is one. Then since it now cancels out the 3rd and 4th bits, if it repeats as all 4-bits for the next 4-bits then it's 1.
"0110 1001" by the same method is not compressed but inflated to "00 0 10 0 10 0 00"
-Starting with 0, does not repeat so it's another 0, and it does not repeat it's 2 bits as whole so another 0. Then by means the 3rd bit is used to start which is 1, it doesn't repeat so next is 0. And the 4 bits do not repeat as whole so it's another 0. By means the 1st bit of the next set is used which is 1, and it doesn't repeat so next is 0. The first 2 bits of the second set do not repeat so it's another 0. By means, again, starts with the 1st of the 2nd 2 bits which is 0. And it does not repeat so it's another 0.
There is also the cancelation rule.
"1110 1111" is compressed as "11 0 1X 111"
-Where X means it doesn't need the info since the first 2 bits are the same but do not repeat, then since the next 2 bits begin with a 1, it has no-choice but to be a 0, so that 0 does not need to be there and is not put in the output sequence.
I call this process Polarized compression, because the fact that it can be used in unlimited number of sets of 2 bits, and the more 0's than 1's or more 1's than 0's, can be compressed, deflated, inflated, decompressed to a loss-less data form based on its sequence.
So, no matter what, it can be compressed by means of using more than 8 bits to compress by using decompression or using less than 8 bits to decompress by compression.
I got it in all notes but the formula is lacking. Any suggestions?
53323737 15 743 313402 05 740313063. 17 15 4150 743 313402 05 140393403437 5203 743 30210.

-
Apr 19th, 2004, 06:04 PM
#2
Could you expound on this?
"1111 1111" is compressed into "1111"
-Starting with the first bit of 1, then if it repeats it is 1, if it repeats the 2 bits of it again then it is one. Then since it now cancels out the 3rd and 4th bits, if it repeats as all 4-bits for the next 4-bits then it's 1.
Take "1111" [1(a)1(b)1(c)1(d); letters will correspond to each bit]. 'a' would signify it starts with 1, 'b' would signify it repeats the 1, 'c' would signify it continues repeating (11) [we then have a starting 1, a second one, and two ending ones: 1111]. 'd' would signify it again repeats the old pattern, adding what we already have which is 4 1's making 11111111. Is this right?
The time you enjoy wasting is not wasted time.
Bertrand Russell
<- Remember to rate posts you find helpful.
-
Apr 20th, 2004, 02:18 PM
#3
Thread Starter
Hyperactive Member
Yup that's right.
1111 1111 = abcd efgh
a = 1
ab = 1
abcd = 1
abcdefgh = 1
If it's 1110 1110 then it would be:
a = 1
ab = 1
abcd = 0
--c = 1
--cd = (CANCELED, NO CHOICE)
abcdefgh = 1
If it's 1110 1101 then:
a = 1
ab = 1
abcd = 0
---c = 1
---cd = (CANCELED, NO CHOICE)
abcdefgh = 0
e = 1
ef = 1
efgh = 0
--g = 0
--gh = 0
But coding it is a different and difficult story.
53323737 15 743 313402 05 740313063. 17 15 4150 743 313402 05 140393403437 5203 743 30210.

Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|