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

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

From: Eric Uhrhane <ericu@chromium.org>
Date: Wed, 28 Aug 2013 10:07:15 -0700
Message-ID: <CAHvSExf2-cn6Lh-L6ArAp-T769-qb9dADttABnNL4rZF440+pQ@mail.gmail.com>
To: Glenn Maynard <glenn@zewt.org>
Cc: WHATWG <whatwg@whatwg.org>
On Wed, Aug 28, 2013 at 9:43 AM, Glenn Maynard <glenn@zewt.org> wrote:
> 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).

Anne's quote snipped off an important piece of my message [which
apparently didn't get out due to the too-many-recipients problem]:

> [Before you respond that it's streamable, please look in the archives
> for the rebuttal.]

We've covered this several times.  The directory records in a zip can
be superseded by further directories later in the archive, so you
can't trust that you've got the right directory until you're done
downloading.

> 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 17:07:55 UTC

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