On 2009-02-10, Torsten Curdt <tcu...@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-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to