Squares

General FreeBASIC programming questions.
Locked
albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Squares

Post by albert »

How do you get a "host name" , over the internet?

Like if i have a server , and someone wants to download the program, how do i get their host name?
Is the host name in the IP packets?

I'm jumping the gun here ; as i haven't yet , got the compressor working. I guess I'm going off , half-cocked.
albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Squares

Post by albert »

I got the compressor idea worked out..

You sum the 7 x 7 grid horizontally and vertically , the output is 42 bits instead of 49 bits. so it compresses 7 its each grid.

Then you create a database of all the possible grids , and put the grid database and 42 bit sums , in the Cloud..
Then to decompress ; you pass the sum to the cloud server , and it returns the corresponding grid...

Then you need a internet connection to decompress..

The cloud database , would need to be sectioned off into numbers of bits...
So you only have to search a portion of the database... like break it into octants or greater
So maybe you would have 1,000,000 grids in each section.
So with 1,000,000 grids per section , you would only have to scan a 92 megabits database section.


I don't yet have the compressor working , cause i can't figure out how to decompress the grids?
My only solution i could come up with , is to make a database of all possible grids..
That takes 49 bits worth of database elements. 49 bits for the grid plus a space and then 42 bits for the sums. 92 bit long elements.

When you turn a file into binary , you probably would never see 49 0's or 48 0's..
So you could probably use the first 127 grids to point to one of the 127 duplicate grids.
Just have to figure out how to decompress...

It would take a terabytes and terabytes of server HD space.. And gigs and gigs of ram..

But the idea is recursive, so you can keep compressing the output , till it gets down to 42 bits , or 9 bytes.
You could compress the entire universe of data to 9 bytes.
albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Squares

Post by albert »

I got that wrong!

42 bits is 6 bytes , instead of 9 bytes...
It can compress the universe down to 6 bytes.

Call it Star_6 or Cloud_6
albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Squares

Post by albert »

So the people pay a one time fee to buy the compressor , ( $10 to $30 )
Then they pay a monthly band-with fee , like $1 or more dollars a month , to use the cloud decompressor..

The company would have like 1,000,000,000 worldwide customers.. It would earn , like a billion dollars a month , or more..

People in each country , would pay $1 of their countries dollars , each month..
So Mexico would pay 50 cents a month...UK and EU would pay $1.30 each month..

You would have one or more decompression servers in each country. Where ever they have DNS name servers..

A company , is usually valued at 10 years of income ..
So the company would be valued at like $120,000,000,000 dollars. (120 billion ) (12 billion a year * 10 yrs )
albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Squares

Post by albert »

Some households have 4 or more cell phones and 2 or more computers...
So they would pay 4 or more dollars a month to use the cloud de-compressor..

Maybe you could give them a single site license for less.
Maybe 2 or 3 dollars a month for up to 8 connections.

How would you handle that case??

You would have to record the numerous connections associated with a single credit card number? That case is difficult to fathom.

=========================================================================================================
It would be easier to give the compressor away for free...
And then charge a monthly fee when a connection tries to decompress.
Then the company records all the credit and debit card numbers..
And matches them to connections..
So , if there's multiple connections associated with a common credit card , then you can give that card a discount.

That solves that problem...
=========================================================================================================
So for a company or household, they need to enter a credit card number into each device , they want to decompress data on..
The server would then sort the credit card numbers and connection host names.. and sort them together..
Then when someone tries to decompress a file , it checks the host name to see if there's a credit card associated with that host name..
Maybe it would record IP addresses instead of host names?
There's probably a lot of duplicate host-names in the universe.

I have to keep philosophising on the matter , to solve all the bugs.....

Problem with IP's : Some servers use dynamic IP's , so every time you logon you get a different IP address.
So maybe you would need to use host-names after all???
Richard
Posts: 3096
Joined: Jan 15, 2007 20:44
Location: Australia

Re: Squares

Post by Richard »

Albert wrote:It would be easier to give the compressor away for free...
And then charge a monthly fee when a connection tries to decompress.
Then the company records all the credit and debit card numbers..
You are dreaming.
To give it away requires you must first write a compressor that actually works.
Albert wrote:What i'm trying to do i to either compress a file
Or
To alter a *.zip file , so it can be compressed a second time and third time , etc..
I understand what you are trying to do.
The problem is that you do not understand what you are trying to do.
That is why I suggested you needed to look at pattern recognition and suffix trees, without which you are lost.

Fixed algorithms that manipulate arrays of bits will reduce the volume of data but will also reduce information, so they will not be reversible. Again, you must look at pattern recognition and suffix trees.
badidea
Posts: 2591
Joined: May 24, 2007 22:10
Location: The Netherlands

Re: Squares

Post by badidea »

Maybe you should start with getting your amazing data compressor to work, before fantasizing how rich you could get. It sounds like 99% fantasy, 1% real code or less).
Edit: posted at the same time as Richard
albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Squares

Post by albert »

The other problem is ; 49 bits and 42 bits , are odd number of bytes..
albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Squares

Post by albert »

You guys !!!!

The compressor works.. The decompression is the problem.
That's why i suggested , a server with all the possible grids presolved.

When people find out they can compress a 5 megabyte photo down to 6 bytes, they will all be hooked..

A 32 Gigabyte iPhone , would be able to hold , ( 32 Gigabytes / 6 ), worth of pictures.. Thats like 6,000,000,000 ( 5+ billion ) photos..
badidea
Posts: 2591
Joined: May 24, 2007 22:10
Location: The Netherlands

Re: Squares

Post by badidea »

Without a working decompressor, your compressor is just a fancy hash generator.
albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Squares

Post by albert »

@Richard

Besides the grid compressor....

I've been working on modifying a *.zip file , so it can be compressed a second time and third time and more.

I found an algorithm that works!!
It can compress random data.. num+= chr( int( rnd * 256 ) ) * number of chars..
The first couple runs , it expands the data.. And then it starts compressing the data by several percent each run...
After 100 runs it compresses the data by 90% to 96%

It only works on a certain number of bytes, the input needs to be a size that has repetitive bytes..
It doesn't work on 1,000 bytes , it needs to be at least 4KB to compress. 8KB and up does better..

The compression and decompression are extremely fast... I still need to run some tests , to see if it decompresses properly..
Richard
Posts: 3096
Joined: Jan 15, 2007 20:44
Location: Australia

Re: Squares

Post by Richard »

Albert wrote:I found an algorithm that works!!
Albert wrote:The compression and decompression are extremely fast... I still need to run some tests , to see if it decompresses properly..
How do you know it works if you have not thoroughly tested it.
Your compression factor is subject to the Dunning-Kruger effect.
paul doe
Moderator
Posts: 1732
Joined: Jul 25, 2017 17:22
Location: Argentina

Re: Squares

Post by paul doe »

Ahh, nice to see that greed trumps over common sense again. All's well, the world is safe (at least, for a little while longer)
dodicat
Posts: 7983
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: Squares

Post by dodicat »

badidea wrote:Without a working decompressor, your compressor is just a fancy hash generator.
Looking into cryogenics I note that people will pay about 200000 dollars for the process, and for the less well heeled, about 80000 dollars a head (literally).
So these half way processes have value.
jj2007
Posts: 2326
Joined: Oct 23, 2016 15:28
Location: Roma, Italia
Contact:

Re: Squares

Post by jj2007 »

dodicat wrote:for the less well heeled, about 80000 dollars a head (literally).
They will probably end up less well healed.
Locked