Squares

General FreeBASIC programming questions.
angros47
Posts: 1673
Joined: Jun 21, 2005 19:04

Re: Squares

Postby angros47 » Jun 26, 2020 15:32

albert wrote:@angros47

I think walking down a virtual isle filled with items would be a good idea..


Other people thought the same, before, and tried it. In the end, customers preferred more conventional sites. So, it doesn't matter what you think: that solution was tried, and didn't work.


albert wrote:I spent 10 hours today working on formulas , some 50 or so different formulas , and nothing compressed..

So far , I've tried several thousand different formulas , over the last two years..


That should show you that you are pursuing a wrong solution. Someone (perhaps Einstein) once said "Insanity is doing the same thing over and over again and expecting different results."

albert wrote:I've only posted the ones that compressed.. But sadly , none of them could be decompressed..


How many times do I have to tell you? If it could not decompressed, it was never compressed, it was just corrupted

Richard wrote:Aisle 3. Unreliable compressors, the longest aisle and most are free. It includes hardware like “write only memory”, fake cache, and the original Diskdoubler card for the PC.


The original Diskdoubler card for PC was actually a coprocessor to help the software Diskdoubler (a software that worked more or less like Stacker, or DoubleSpace (later DriveSpace), so why do you call it an unreliable compressor? Perhaps are you confusing it with SoftRam (that indeed didn't work, and the company that produced it was charged and convicted for scam)?
Richard
Posts: 3030
Joined: Jan 15, 2007 20:44
Location: Australia

Re: Squares

Postby Richard » Jun 26, 2020 16:26

Not SoftRam, but an earlier hardware compression failure that could not be fixed because the code was in ROMs. The board was a PC-XT hardware processor on ISA? bus, DOS, pre-1990, when a HDD could be up to 40 Mbyte.
albert
Posts: 5916
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Squares

Postby albert » Jun 26, 2020 22:53

That's where i got the idea to work on data compression...

I had an old IBM XT With a 10 megabyte hard drive... Running DOS 5
I bought PK-Zip and compressed all the files..

Then i tried to re-zip a ZIP file , and it expanded...

So , i thought i would become a millionaire , by making a zip zipper..

The years went by , I'd work on formulas every now and then.. But nothing worked...

But now , since I've got all this free time on my hands.. I thought I'd work on it every day..
angros47
Posts: 1673
Joined: Jun 21, 2005 19:04

Re: Squares

Postby angros47 » Jun 27, 2020 0:21

albert wrote:So , i thought i would become a millionaire , by making a zip zipper..


I see. Well, bad news for you: compressing an already compressed file is mathematically impossible. I tried to explain it to you in the past. If you don't believe me, do what you want, but you will get disappointed
albert
Posts: 5916
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Squares

Postby albert » Jun 27, 2020 1:20

@angros47

I'm working on manipulating the values..

Rearranging or manipulating the values , to create compressible patterns..

The map of the rearrangement has to be as small as possible..
Bubble sorting a random string is a no-brainer , but the map of the process is too large....

I have to find a way to rearrange the values , so with the map added , it will still compress..
albert
Posts: 5916
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Squares

Postby albert » Jun 27, 2020 2:45

I've finally got a formula that compresses... But i can't post it...
At least not until i get the decompression written....

I don't want to get kicked off the forum..

I've checked it and checked it , and there are no output duplicates...

If i get the decompression written , then if i post it..
Then i can't become a billionaire , it would be free ware.

So maybe i won't post it after all...

It inputs 100,000 bytes and outputs 150,000 bytes , and then compresses the 150,000 bytes down to 60,000 , on the first loop.. 39%
albert
Posts: 5916
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Squares

Postby albert » Jun 28, 2020 0:04

Sorry , it could not be decompressed...

if bin( chr ) <= 7 then out = chr ( bin( chr ) )
if bin( chr ) = 8 then if right 4 bits < 8 then out = chr( left( 4 ) + right( 3 ) ) else out = chr( bin( chr ) )

There's 2 7's

So you can't tell if it 7 bits , or 4 and 3

But it compressed 98% after 100 loops... To bad it it couldn't be decompressed!!!
albert
Posts: 5916
Joined: Sep 28, 2006 2:41
Location: California, USA

Songs

Postby albert » Jun 28, 2020 0:13

Off Topic


Pearl Snap Studios, sent me the invoice for "Dinner Time" and "I Got Music"
I already posted "Dinner Time" here a while back..

I'm gonna get them demo'd in July...

Here's the lyric for "I Got Music"

( Genre = Pop )

( title = I Got Music )

i got music , in my bones
i got music , in my ear phones
and the music , is all in me
and it's music , that you can see

playing the top , song of the day
and my iphone , it knows the way
i move along , to the feeeling
and it leaves the , whole crowd reeling

[ music ]

i got music , in my bones
i got music , in my ear phones
and the music , is all in me
and it's music , that you can see

i got a new , song for the day
my iphone's , playing away
i move along , to the groove
and you can see , my body move

[ music ]

i got music , in my bones
i got music , in my ear phones
and the music , is all in me
and it's music , that you can see

got a new groove , that i can share
got the music , up in the air
i move along , to the feeeling
and it leaves the , whole crowd reeling

[ music ]

i got music , in my bones
i got music , in my ear phones
and the music , is all in me
and it's music , that you can see

got a new song , for me to play
got a new song , its new today
i move along , to the groove
and you can see , my body move

[ music ]

i got music , in my bones
i got music , in my ear phones
and the music , is all in me
and it's music , that you can see

my iphone's , playing along
and it's playing , a whole new song
i move along , to the feeeling
and it leaves the , whole crowd reeling

[ music ]

i got music , in my bones
i got music , in my ear phones
and the music , is all in me
and it's music , that you can see

[ music ]

i got music , in my bones
i got music , in my ear phones
and the music , is all in me
and it's music , that you can see


albert_redditt@yahoo.com

Albert Redditt
315 W. Carrillo St. #104
Santa Barbara, Ca. 93101 U.S.A.
Tourist Trap
Posts: 2933
Joined: Jun 02, 2015 16:24

Re: Squares

Postby Tourist Trap » Jun 28, 2020 0:25

albert wrote:The map of the rearrangement has to be as small as possible..
Bubble sorting a random string is a no-brainer , but the map of the process is too large....

I have to find a way to rearrange the values , so with the map added , it will still compress..

Hi Albert,

interesting thought. Anyway my feeling is that finding such a mapping is quite a big deal. A few remarks below may show you my point of view on this:
  • Bubble sorting may well not be inverted (as far as I can see). So this would be of no use for this very reason. Once sorted your data will have forgotten where it came from at first.
  • This is not useful to go further and call for a second mapping neither, call it the compressing mapping. Because should your first and unique mapping be well designed, it could do everything in one step and still be a called a mapping.
  • Another thing if you stick at the "rearrangement" mapping idea, would be that you still have to prove that you can write a rearrangement of something in a shortest way that the thing itself. I personnally still can't figure out a way of coding that.

So about the idea of a single pass mapping in general. Something like this below is anyway possible:

Suppose we have to compress the string = "0104060810". Then the mapping coded as 2x,1,5 could be used (meaning take the numbers x from 1 to 5, and apply 2*x to each of them in order, and that's it). To get the original values back here, you just have to do x/2.
Sounds good, but I don't really know about a generalization of this method able to deal with any sequence of bytes.

So maybe you could tell me if you can (for example) and how, write a rearrangement of this given sequence:
"aazazheefefoljmkddee".
It's a dummy example, but it would be a start if you can show how you deal with this one. Maybe you can. Just let's see how so I would have a better understanding of the tools you use for that.
From my side I can only imagine a longer string to describe a rearrangement of this.
albert
Posts: 5916
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Squares

Postby albert » Jun 28, 2020 1:34

@Tourist Trap

If you bring in 2 values , and always put the smallest value first , then it will compress..
But the binary map of 1's and 0's , first and last , makes it expand..

If you output the input , then , at 100,000 bytes in , it expands 48 bytes per loop..
100,000 in , turns into 100,048 out , and then 100,096 on the second loop. it keeps growing by 48 bytes..
albert
Posts: 5916
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Squares

Postby albert » Jun 28, 2020 17:04

As far as searching for patterns.

With your eyes you can see a vast amount data , and see where there are patterns..
The computer is blind..
And requires systematic fumbling..

Not sure how to proceed..
albert
Posts: 5916
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Squares

Postby albert » Jun 28, 2020 22:41

I tried putting the random chrs , str , oct , hex , bits , into a 4x4 grid
And taking the grid by verticales , horizontals and diagonals...

It seems that rearranging the values doesn't compress..

You have to rearrange them so they create patterns..

The grid doesn't create patterns.. It just rearranges the values..
I tried 2x2 , 3x3 and 4x4 grids , of chr , oct , hex , str , bin , the hex was the best , but still expanded by 48 bytes per loop.
Last edited by albert on Jun 28, 2020 23:38, edited 1 time in total.
albert
Posts: 5916
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Squares

Postby albert » Jun 28, 2020 22:55

Since smallest value first compresses..

You turn the random chr string into hex..

Then take the first value , and search for the next lower value.. and put that lower value first..
And replace that value in the input string with a pointer , so you know not to use it in the future...

Then map would be , how many hex digits till the next lower or equal value...

Maybe it would compress...????



.
albert
Posts: 5916
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Squares

Postby albert » Jun 29, 2020 1:59

Maybe stepping through a binary string..

You input the next value , and then search ahead for the next lower or equal value... And make that step , the map..
albert
Posts: 5916
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Squares

Postby albert » Jun 30, 2020 17:48

Nice try, but it didn't work....

If you have a "0111111110" and search ahead for the next lower or equal value, the step can go beyond 8
The map causes it to expand...

Return to “General”

Who is online

Users browsing this forum: No registered users and 7 guests