Tuesday, May 14, 2013

Archiving CFD Data

Running CFD codes such as FLACS or CEBAM invariably produce a large amount of data files. When the files are ready to be archived, I prefer to compress the files. My requirements are that each file be compressed individually, which makes it easier to uncompress 1 file if you need to look at setup or results. Further, I want the entire process to be done from a command line with options for recursion into subfolders, skip files that have already been compressed, and delete the original after compression. Also, decompression should work via a commandline with the same options.
7Zip is the best out there IMO, but it's command line interface lacks some of the needed features above without resorting to a FOR loop in a batch file. I have been using gzip for windows which supports the requirements. Simply put gzip.exe in your path and use like this.
compress entire folder:  gzip -r *   where -r is recursive into subfolders
decompress entire folder gzip -rd *
Another option is the xz library, which uses LZMA compression (see 7zip) and is about 30% better than gzip compression. It works just like gzip but seems to be missing the -r option.
If you use FreeCommander, you can add either of the above tools to the Favorite Tools menu to get a quick button for archiving/unarchiving folders full of data.

No comments:

Post a Comment