Compressing Shapefiles: Which format is best?

Found some old shapefiles lying around that I didn’t want to delete, but was sure I wouldn’t need in the foreseeable future, so I decided to compress them for archiving. But what format is most efficient? Here’s my little unofficial test. Any methods that took longer than I felt like waiting were disqualified (i.e. 7zip Ultra). All commands were run via the command line and timed using the time command.

While tempting to use as a generalizable compression test, the poor showing by bzip2 (one of the newest and most efficient formats) shows that it really does depend what you’re compressing.

Original file: US_tract_1980.shp Original size: 100.2 MB

Format Time Size
7zip Ultra 0m56.212s 46.4 MB
7zip 0m43.357s 46.9 MB
Stuffit SitX LZ-arithmetic 2m6.793s 62.1 MB
Stuffit SitX LZ-Huffman -l 16 0m29.791s 77.7 MB
Stuffit Gzip -l 16 0m31.854s 77.7 MB
Gzip –fast 0m9.980s 78.3 MB
Zip 0m10.923s 78.5 MB
Gzip 0m13.148s 78.5 MB
Gzip –best 0m13.612s 78.5 MB
Stuffit Gzip 0m22.865s 78.8 MB
Stuffit SitX LZ-Huffman 0m19.847s 78.5 MB
Stuffit SitX -l 16 1m17.917s 79.6 MB
Stuffit SitX 1m19.718s 79.6 MB
Stuffit SitX -l 1 1m20.588s 79.6 MB
Stuffit SitX Blocksort 0m57.750s 83.4 MB
Stuffit SitX PPM 2m25.372s 83.4 MB
Bzip2 0m42.309s 87.2 MB
Stuffit Bzip2 0m32.637s 87.9 MB

Table is sorted by size, then by time.

*7zip ultra: 7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on

Wow! 7zip wins by a mile! Nothing else even comes close…

Awesome Shell Script for Adding Wordpress Plugins via SVN

Ridiculous bug in ArcView Import from Interchange File

SVN HELL on Bluehost

TED: Benjamin Zander on Classical music with shining eyes

Death Metal Dog

Lego Secret Vault Contains All Sets In History (VIDEO)

2007: The Year in Metal: A partial post from the archives




FireStats icon Powered by FireStats