[whatwg] Archive API - proposal
davidben at MIT.EDU
Wed Aug 15 10:48:07 PDT 2012
On Wed, Aug 15, 2012 at 7:24 AM, Andrea Marchesini <baku at mozilla.com> wrote:
> Thanks for your feedback.
> When I was implementing the ArchiveAPI, my idea was to have a generic Archive API and not just a ZIP API.
> Of course the current implementation supports just ZIP but in the future we could have support for more formats.
What other sorts of archive formats were you thinking of supporting?
Apart from archive-specific features like the CRC32, different formats
can be read in different ways. A tarball, for instance, can't be read
out-of-order easily. It's literally the files concatenated together
with a header before each. The headers tell you the size of each file,
so you can seek over the data, but you still have to jump across the
entire file sequentially to find a particular file. (Though I suppose
you could build a table once when the file's loaded.) A gzipped
tarball is even worse since the entire stream is compressed, so you
have to decompress it to hop around.
with typed arrays and whatnot?
More information about the whatwg