[whatwg] Zip archives as first-class citizens

Glenn Maynard glenn at zewt.org
Wed Aug 28 09:43:00 PDT 2013


On Wed, Aug 28, 2013 at 4:54 PM, Eric Uhrhane <ericu at chromium.org> wrote:

> > Without commenting on the other parts of the proposal, let me just
> > mention that every time .zip support comes up, we notice that it's not
> > a great web archive format because it's not streamable.  That is, you
> > can't actually use any of the contents until you've downloaded the
> > whole file.
>

ZIPs support both streaming and random access.  You can access files in a
ZIP as the ZIP is downloaded, using the local file headers.  In this mode,
they work like tars (except that you don't have to decompress unneeded
data, like you do with a tar.gz).

This feature wouldn't want that, since you need to read the whole file up
to the file you want.  Instead, it wants random access, which ZIPs also
support.  You download the central directory record first, to find out
where the file you want lies in the archive, then download just the slice
of data you need.  You don't need to download the whole file.

-- 
Glenn Maynard



More information about the whatwg mailing list