Search found 1533 matches

by angros47
Feb 15, 2020 9:31
Forum: General
Topic: Squares
Replies: 7626
Views: 456895

Re: Yah-Zip ( 4 bit )

albert wrote:Just let me know , if it can't be decompressed... I got the decompression started...


It can't be decompressed, because there are some duplicates. And I know for sure that there are duplicates, because of the pigeongole principle: https://en.wikipedia.org/wiki/Pigeonhole_principle
by angros47
Jan 31, 2020 1:00
Forum: General
Topic: Squares
Replies: 7626
Views: 456895

Re: Squares

I'd recommend you to read this: https://en.wikipedia.org/wiki/Lossless_compression#Limitations, to figure why your algorithm can't work
by angros47
Jan 30, 2020 1:16
Forum: General
Topic: Squares
Replies: 7626
Views: 456895

Re: Squares

It compresses, but it also creates duplicates so it can't be decompressed. Check it
by angros47
Jan 18, 2020 13:47
Forum: General
Topic: Squares
Replies: 7626
Views: 456895

Re: Squares

Albert, a simple formula could be to discard the leftmost bit, so you can use only 7 bits instead of 8: most ASCII texts, in fact, never use that bit, and it is always set to 0. In the few cases that bit is used, you can alert the decompressor, by sending a sequence of seven 1 before the byte that n...
by angros47
Jan 14, 2020 0:07
Forum: General
Topic: Squares
Replies: 7626
Views: 456895

Re: Squares

@albert

Try your concept of altered binaries on number from 0 to 15 (all the numbers than can be expressed with one nibble). Then, write here the numbers, and the altered binary representation, so we can see if it would work or not
by angros47
Jan 13, 2020 0:18
Forum: General
Topic: Squares
Replies: 7626
Views: 456895

Re: Squares

Albert, I would recommend you to try a simple thing: write all numbers from 0 to 15 (since each of them can represent a different nibble, and they represent all possible nibbles). Then, , write all the possible combinations of three bits, and count them. Then, try to match every three bit sequence t...
by angros47
Jan 07, 2020 19:00
Forum: General
Topic: Squares
Replies: 7626
Views: 456895

Re: Squares

Two conflicts, at least: if n1 = "0000" then n2 = "0111" if n1 = "1111" then n2 = "0011" <---- if n1 = "0001" then n2 = "1000" if n1 = "0010" then n2 = "1001" if n1 = "0100" then n2 = "1010" if n1 = &...
by angros47
Jan 07, 2020 18:19
Forum: General
Topic: Squares
Replies: 7626
Views: 456895

Re: Squares

@angros47 Could you look over it to see if there's duplicates... You seem to have a better mind than me at finding the duplicates... I don't have a better mind. I just know for sure that duplicates are inevitable , for the reason I already told you if n1 = "0000" then n2 = "0110"...
by angros47
Jan 06, 2020 22:06
Forum: General
Topic: Squares
Replies: 7626
Views: 456895

Re: Squares

*sigh* You wrote: I fixed the duplicate problem.. by making the 4th bit "01" instead of "0" So now , there's no duplicates... There is a duplicate, instead: Nibbles 0100 and 1000 : they produce 100 and 10 Nibble 0101: it produces 10010 When I have to decompress, if I find the seq...
by angros47
Jan 06, 2020 18:57
Forum: General
Topic: Squares
Replies: 7626
Views: 456895

Re: Squares

But while hard wiring it.. i found a problem... there's duplicates... How many times have you repeated this part? There will always be duplicates, it is inevitable, because in n bits you can only have 2^n possible combinations, so you cannot map all the combinations of n bits in a number of bits lo...
by angros47
Jan 05, 2020 18:50
Forum: General
Topic: Squares
Replies: 7626
Views: 456895

Re: Squares

So if n1 is 11111111, n2 should be 011011 (6 bits), and so n3. Add the 0 separators, and you end with 6+1+6+1=14 bits instead of 8. You will not compress, you will bloat the data set.

And having 4 bit set (or not set) is actually pretty common, in pictures for examples, if a big area is white.
by angros47
Jan 05, 2020 13:36
Forum: General
Topic: Squares
Replies: 7626
Views: 456895

Re: Squares

I think if somebody says to you that something is mathematically impossible (as per angros47), then a mathematical proof of this is required. You are right. In fact, I provided a mathematical proof of it: https://freebasic.net/forum/viewtopic.php?p=265180#p265180 Do you think that my approach is su...
by angros47
Jan 03, 2020 14:16
Forum: General
Topic: Squares
Replies: 7626
Views: 456895

Re: Squares

Albert, are you starting to understand, now, why I told you that it is mathematically impossible to compress at a constant, fix ratio?
There is always some ambiguity, no matter how you rearrange your bits
by angros47
Jan 01, 2020 0:02
Forum: Beginners
Topic: Playing non-file audio
Replies: 16
Views: 504

Re: Playing non-file audio

Try my library at: https://sourceforge.net/projects/freebasic-sfx-library/files/

It has specific commands to emit sine waves, or also other waveforms, and to shape and filter them
by angros47
Dec 12, 2019 9:40
Forum: General
Topic: Squares
Replies: 7626
Views: 456895

Re: Squares

And what happens if you have to compress a quadruple that starts with "A0" and ends with "~"? When you try to restore it, the decompression algorithm can tell that it was part of the original data set, and not something to decompress?

Go to advanced search