commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: [compress] not reading archive stream completely
Date Thu, 17 Jan 2013 14:24:35 GMT
On 2013-01-17, Torsten Curdt wrote:

> If we see `getNextEntry` return null we should position the stream at
> the end of the archive.  I think that's your (1). Sounds simpler and
> more straight forward from an API POV.  IIUC that reading should only
> be a few bytes. A second EOF marker for TAR for example.

For tar it would be one block (usualy 512 bytes), for zip the full
central directory has to be read which could be quite a bit.

I currently plan to implement it inside getNextEntry as it is cleaner.
In the tar case I vaguely recall some implementation only write one EOF
marker so a more careful aproach is needed in order to not read beyond
the end of the archive (likely mark and reset if the stream supports



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message