[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: XARCHON Data files



In localhost.xarchon, you wrote:
> On Tuesday 26 March 2002 14:47, hursh wrote:

>> I spat out zip just because I know of libraries that handle it fairly
>> transparently.  Are the any good libs for reading a tar file?
> 
> The zlib package has a small example of processing a (gzipped) tar file, and 
> it is small and extremely simple.   I don't know of anything really 
> "mainstream" except maybe gnome-vfs, but I wouldn't want to require GNOME 
> libraries (or any other library) just for this.

The major reason not use .zip over tar.gz is that you cannot randomly
access the contents of a .tar.gz .  If you have enough memory to just
untar everything into RAM or are willing to do linear seeks to find
files, this doesn't matter (and probably doesn't for xarchon).  .zips
can be randomly accessed (although this reduces their compression
ratio vs. .tar.gz).  I think that the zlib code includes samples to
read from simple .zip files as well, or if not, the code is pretty
easy to write.

The major reason to avoid symlinks is that they aren't portable --
they are a unixism, and don't exist in the same form on (say) Win32.
A zip file containing only plain files is the most portable option if
you're trying to future proof your design, I think.

-- 
bryan k ogawa  <bko@idiom.com>   http://www.idiom.com/~bko/