Thomas,

Please create a JIRA and describe and attach the patch there, with a unit
test if possible.

Thank you,
Gary

On Mon, Oct 29, 2012 at 1:02 PM, Thomas Meyer <tho...@m3y3r.de> wrote:

> Hi,
>
> attached patch enables an program to add a listener when a new bzip2
> block is detected.
>
> The notifier is called with:
>  - xxx.newBlock(this, currBlockNo, currBlockPosition)
>
> - this = the current BZip2CompressorInputStream object
> - currBlockNo = The current block number, increased for each block
> - currBlockPosition = The offset (i.e. start position) in the compressed
> input stream of the current block
>
> the "this" is send to enable the listener to get the number of read
> bytes in the uncompressed input stream via this.getBytesRead().
>
> With the attached patch a program can parse a bzip2 file and create an
> index of all bzip2 block offsets on the fly. This index can later on be
> used to skip to the correct block for faster positioning.
>
> comments are welcome.
>
> with kind regards
> thomas
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>



-- 
E-Mail: garydgreg...@gmail.com | ggreg...@apache.org
JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Reply via email to