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

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