[erlang-questions] Multiple modules

Bob Ippolito <>
Thu Oct 5 12:38:40 CEST 2006


On 10/5/06, Bengt Kleberg <> wrote:
> On 2006-10-05 10:54, Romain Lenglet wrote:
> ...deleted
> > Then, why not simply add support for .zip files in the code
> > loader? Like .jar files in Java?
>
> is .zip files archives?
> does the zlib module handle that kind of archives?
>
> otherwise it would be simpler to use .tgz archives, since both gzip and
> tar is already provided in erlang.

zip files have a manifest at the end, so it's quick to see what's in
there. You don't have to decompress anything. That's why many (most?)
languages that have code archives use something derivative of zip.

Another interesting feature of zip is that the spec only specifies the
end of the file. You can have an arbitrary amount of data at the front
of a zip file. Self-extracting zips and other installer-like-things
can often be operated on directly with normal zip tools, since they
always start from the end looking for the magic bytes and the
manifest.

-bob



More information about the erlang-questions mailing list