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] 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
mark).

Thanks

        Stefan

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


Mime
View raw message