DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=42713>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=42713 ------- Additional Comments From [EMAIL PROTECTED] 2007-11-13 05:02 ------- I tried to manually apply the patch from http://issues.apache.org/bugzilla/show_bug.cgi?id=32200 to the head version of bzip2. This causes BZip2OutputStream to no longer fail when nothing is written to it, but the resulting compressed date fails to decompress with BZip2InputStream. The failure in Bzip2OS (no writes, just close) is caused by the field last = -1. This leads to division by zero after adding 1 in method mainSort(): for (i = 0; i < NUM_OVERSHOOT_BYTES; i++) { block[last + i + 2] = block[(i % (last + 1)) + 1]; } The patch now catches this case (last < 0) and sets than last = 0. But this case (last == 0) is also the case when you write just exactly one byte to the Bzip2OS. I guess thats why Bzip2IS fails with reading the result of an ´empty compressed´ Bzip2OS. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]