7-zip compression

Wednesday, May 16, 2012 - 11:58

|

GEO files can be big. This is partly because they are text files (readable in let's say Notepad), but also because they often contain repetitive information (for example, even a tiny facets with default parameters takes about 20 lines to write).

There is also a problem related to this: sending them by email or sharing over Dropbox might result in the browser interpreting the content (ie. displaying the GEO file as a webpage instead of downloading, the email client putting the file content in the email, etc.).

Good news is, because of this uncompact and repetitive behaviour, they are very well compressible. It is not common to haveĀ 2% compression ratio, converting a 100MB GEO file to a 2MB GEO7Z file.

Compression is performed by using the opensource 7-ZIP project, giving commands to the stand-alone command-line 7za.exe component, that is bundled from now on with every release.

When Moflow saves a GEO file, then a background process is launched minimized to compress the file:

If the compression finishes correctly (resulting in a GEO7Z file), this process will close (the icon will disappear), and the GEO file is deleted. If, however, an error occurs, then the GEO file is kept, and this background process will pop up to inform the user about the error:

Image

You can open the resulting .GEO7Z file with 7-zip, and it will contain the original GEO file:

Image