W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2013

Re: [whatwg] Zip archives as first-class citizens

From: Glenn Maynard <glenn@zewt.org>
Date: Wed, 28 Aug 2013 11:43:00 -0500
Message-ID: <CABirCh-N5SVnnZkB1+WHD9FvgrVX6AqAfhfBAse0DdggzPcqGw@mail.gmail.com>
To: Anne van Kesteren <annevk@annevk.nl>
Cc: Eric Uhrhane <ericu@chromium.org>, WHATWG <whatwg@whatwg.org>
On Wed, Aug 28, 2013 at 4:54 PM, Eric Uhrhane <ericu@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
Received on Wednesday, 28 August 2013 16:43:30 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:23 UTC