http://www.perlmonks.org?node_id=151635


in reply to Plug-in architectures

As perrin mentions, this may be too complex a solution to a comparatively simple problem. However, if you decide to take this approach, you'll probably find that ZIP files are a better choice than .tar.gz files. Open Office uses ZIP files to store multiple files in a single file, claiming that ZIP is better than .tar.gz for on-demand loading of archived files.

Replies are listed 'Best First'.
Re(2): Plug-in architectures
by FoxtrotUniform (Prior) on Mar 14, 2002 at 16:07 UTC

    bzip2 is another alternative for compressing files.

    Update: I mentioned bzip2 for completeness, not as advocacy. tomhukins' points below are quite valid.

    --
    :wq

      bzip2 is great if your aim is to compress files as small as possible. It's much slower than gzip and ZIP encoding, though, so for files which are frequently read from or written to, as we're dealing with here, it's inappropriate. Also, bzip2 is just a compression mechanism: you'd still need to use something like tar to archive multiple files into one file.

      See the Open Office document I mentioned earlier for an explanation of why .tar.gz encoding isn't the best approach, then add the comparative slowness of bzip2 (especially for compressing files), and you've got a solution which is far from optimal.