Originally posted by RKIF-DragonClaw:
I was thinking about compression like taking frequent sequences in files and associating each sequence with a letter, reducing size drastically...
That's what we have nowadays. Take GIF as an example:

If you have a GIF that is nothing but a color gradient, with the colors changing from top to bottom (such as the one on the right, which is 9Kb), it will compress excellently. That's because the GIF compression takes a single line (row, not column), looks for identically colored pixels, and stores a single color entry for all of those pixels. It then moves on to the next line, and goes over that line seperately from the first one. So if you have, on each line, a single color - even though the color itself changes from line to line - the compression will be excellent.

However, if you do something as simple as rotate the gradient 90 degrees, so that each vertical column of pixels has a single color, you will see that the file size is significantly larger (The GIF on the left is 14Kb). This is because any single horizontal line does not contain the same colored pixel twice, so the GIF algorithm has to store specific color-data for each pixel, and each line. Ouch.

------------------
America, stand assured that Israel truly understands what you are going through.
Know how to use Rhino3D? Want to put your ships into Freespace 2? You've come to the right place!
"He who laughs last thinks slowest."
"Just becase you're paranoid doesn't mean they're not out to get you."
"To err is human; to really screw up you need a computer."
Creator of the Sandvich Bar, the CapShip Turret Upgrade, the Complete FS2 Ship List and the System Backgrounds List (all available from the site)[This message has been edited by sandwich (edited 01-10-2002).]