-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|678|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
SoCoder -> Link Home -> Help/Tutorials


 
HoboBen
Created : 11 July 2010
Edited : 11 July 2010

Precompression Filter



https://www.w3.org/TR/PNG-Filters.html
Improve the compressibility of your data by filtering it in this way.



Improve compression further by arranging data in a way that it precompresses better, too!

e.g. rather than do this:

For each tile
WriteInt(tileType)
WriteInt(tileColor)
WriteInt(tileSomethingElse)
Next

where each written int is going to vary widely,

Do this:

For each tile
WriteInt(tileType)
Next

For each tile
WriteInt(tileColor)
Next

For each tile
WriteInt(tileSomethingElse)
Next

Where each block is going to be full of values with little difference.

 

Comments


Sunday, 11 July 2010, 01:30
Mog
Good point, actually...
Sunday, 11 July 2010, 04:20
HoboBen
Here we go, did I nice write-up! Optimal Compression for Binary Data
Sunday, 11 July 2010, 12:03
Mog
Again, good stuff, Ben. I feel stupid from not considering this sooner.
Sunday, 11 July 2010, 14:45
Jayenkai
Great stuff! That's a fantastic leap in filesize!