commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: [compress] Some merging in zip package
Date Tue, 10 Feb 2009 10:33:38 GMT
On 2009-02-10, Torsten Curdt <tcurdt@vafer.org> wrote:

>> Ant never had a ZipInputStream replacement, we only use ZipFile since
>> the zip format is a lot easier to implement on top of
>> RandomAccessFile.

> Hm ... never thought this would be a problem for just reading.

You need to merge data from the local file header with data from the
central directory - and the central directory is at the end of the
archive so you end up jumping between the end of the stream and the
local file header position a lot.

It also means you have to read the stream fully to even read the first
entry.

I think java.util.zip.ZipInputStream simply ignores the central
directory, something I wouldn't like to do myself.

>> that you should use ZipFile if you intend to read a zip archive
>> with non-UTF8 encoding of filenames.

> Why is that?

Our ZipArchiveInputStream uses java.util.zip.ZipInputStream which
doesn't deal with any encoding other than UTF-8.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message