You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Hans horn (Created) (JIRA)" <ji...@apache.org> on 2011/11/04 16:55:51 UTC

[jira] [Created] (COMPRESS-161) bzip2 decompression terminates after 900000 bytes

bzip2 decompression terminates after 900000 bytes
-------------------------------------------------

                 Key: COMPRESS-161
                 URL: https://issues.apache.org/jira/browse/COMPRESS-161
             Project: Commons Compress
          Issue Type: Bug
          Components: Compressors
    Affects Versions: 1.3
         Environment: Windows7 64bit JDK7u1,2
            Reporter: Hans horn
            Priority: Critical
             Fix For: 1.3


bzip2 decompression terminates (w/o error) after 900000 bytes

    try {
      InputStream iin = new BZip2CompressorInputStream(new FileInputStream(bzip2 compressed file that was uncompressed > 900000 bytes in size);
      int data = iin.read();
      while (data != -1) {
        System.out.print((char) data); ++nBytes;
        data = iin.read();
      }
    } catch (IOException iox) { /**/ }
    System.out.println("#Bytes read " + nBytes);

prints: #Bytes read 900000

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COMPRESS-161) bzip2 decompression terminates after 900000 bytes

Posted by "Gary D. Gregory (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COMPRESS-161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13144123#comment-13144123 ] 

Gary D. Gregory commented on COMPRESS-161:
------------------------------------------

Can you attach you example bzip2 file?
                
> bzip2 decompression terminates after 900000 bytes
> -------------------------------------------------
>
>                 Key: COMPRESS-161
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-161
>             Project: Commons Compress
>          Issue Type: Bug
>          Components: Compressors
>    Affects Versions: 1.3
>         Environment: Windows7 64bit JDK7u1,2
>            Reporter: Hans horn
>            Priority: Critical
>             Fix For: 1.3
>
>
> bzip2 decompression terminates (w/o error) after 900000 bytes
>     try {
>       InputStream iin = new BZip2CompressorInputStream(new FileInputStream(bzip2 compressed file that was uncompressed > 900000 bytes in size);
>       int data = iin.read();
>       while (data != -1) {
>         System.out.print((char) data); ++nBytes;
>         data = iin.read();
>       }
>     } catch (IOException iox) { /**/ }
>     System.out.println("#Bytes read " + nBytes);
> prints: #Bytes read 900000

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (COMPRESS-161) bzip2 decompression terminates after 900000 bytes

Posted by "Hans horn (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COMPRESS-161?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hans horn updated COMPRESS-161:
-------------------------------

    Attachment: INT1_aminey.inp.bz2

Gary,

most certainly.
the attached bzip2 compressed file should uncompress to a file of length 
6045970.

Thx for looking into this.

Kindly,
H.



                
> bzip2 decompression terminates after 900000 bytes
> -------------------------------------------------
>
>                 Key: COMPRESS-161
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-161
>             Project: Commons Compress
>          Issue Type: Bug
>          Components: Compressors
>    Affects Versions: 1.3
>         Environment: Windows7 64bit JDK7u1,2
>            Reporter: Hans horn
>            Priority: Critical
>             Fix For: 1.3
>
>         Attachments: INT1_aminey.inp.bz2
>
>
> bzip2 decompression terminates (w/o error) after 900000 bytes
>     try {
>       InputStream iin = new BZip2CompressorInputStream(new FileInputStream(bzip2 compressed file that was uncompressed > 900000 bytes in size);
>       int data = iin.read();
>       while (data != -1) {
>         System.out.print((char) data); ++nBytes;
>         data = iin.read();
>       }
>     } catch (IOException iox) { /**/ }
>     System.out.println("#Bytes read " + nBytes);
> prints: #Bytes read 900000

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COMPRESS-161) bzip2 decompression terminates after 900000 bytes

Posted by "Stefan Bodewig (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COMPRESS-161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13146179#comment-13146179 ] 

Stefan Bodewig commented on COMPRESS-161:
-----------------------------------------

Hans, what kind of XZ problems did you have to work around?  trunk should be building out of the box.

WRT parallel bzip2 - no concrete plans, patches welcome ;-)
                
> bzip2 decompression terminates after 900000 bytes
> -------------------------------------------------
>
>                 Key: COMPRESS-161
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-161
>             Project: Commons Compress
>          Issue Type: Bug
>          Components: Compressors
>    Affects Versions: 1.3
>         Environment: Windows7 64bit JDK7u1,2
>            Reporter: Hans horn
>            Priority: Critical
>             Fix For: 1.4
>
>         Attachments: INT1_aminey.inp.bz2
>
>
> bzip2 decompression terminates (w/o error) after 900000 bytes
>     try {
>       InputStream iin = new BZip2CompressorInputStream(new FileInputStream(bzip2 compressed file that was uncompressed > 900000 bytes in size);
>       int data = iin.read();
>       while (data != -1) {
>         System.out.print((char) data); ++nBytes;
>         data = iin.read();
>       }
>     } catch (IOException iox) { /**/ }
>     System.out.println("#Bytes read " + nBytes);
> prints: #Bytes read 900000

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COMPRESS-161) bzip2 decompression terminates after 900000 bytes

Posted by "Hans horn (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COMPRESS-161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13145574#comment-13145574 ] 

Hans horn commented on COMPRESS-161:
------------------------------------

Stefan,

I probably compressed it using cygwin's pbzip2 in August when I started 
to run out of disk space.
I just unpacked that file and repacked it using the non-parallel version 
of cygwin bzip2 and it decompresses just fine with Commons Compress!

Nice catch, Stefan!!!!

What now? I've got about 500GB of stuff compressed that way, that has 
become inaccessible to Java.
Are there any plans to support "multiple concatenated streams" in 
Commons Compress in the not so distant future?

Thx.,
H.



                
> bzip2 decompression terminates after 900000 bytes
> -------------------------------------------------
>
>                 Key: COMPRESS-161
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-161
>             Project: Commons Compress
>          Issue Type: Bug
>          Components: Compressors
>    Affects Versions: 1.3
>         Environment: Windows7 64bit JDK7u1,2
>            Reporter: Hans horn
>            Priority: Critical
>             Fix For: 1.3
>
>         Attachments: INT1_aminey.inp.bz2
>
>
> bzip2 decompression terminates (w/o error) after 900000 bytes
>     try {
>       InputStream iin = new BZip2CompressorInputStream(new FileInputStream(bzip2 compressed file that was uncompressed > 900000 bytes in size);
>       int data = iin.read();
>       while (data != -1) {
>         System.out.print((char) data); ++nBytes;
>         data = iin.read();
>       }
>     } catch (IOException iox) { /**/ }
>     System.out.println("#Bytes read " + nBytes);
> prints: #Bytes read 900000

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COMPRESS-161) bzip2 decompression terminates after 900000 bytes

Posted by "Stefan Bodewig (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COMPRESS-161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13145550#comment-13145550 ] 

Stefan Bodewig commented on COMPRESS-161:
-----------------------------------------

I can confirm the limit with the file you have attached.  At the same time I can easily uncompress even larger files completely so there must be something specific to the archive you are using.

Any hints on how you have created it?
                
> bzip2 decompression terminates after 900000 bytes
> -------------------------------------------------
>
>                 Key: COMPRESS-161
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-161
>             Project: Commons Compress
>          Issue Type: Bug
>          Components: Compressors
>    Affects Versions: 1.3
>         Environment: Windows7 64bit JDK7u1,2
>            Reporter: Hans horn
>            Priority: Critical
>             Fix For: 1.3
>
>         Attachments: INT1_aminey.inp.bz2
>
>
> bzip2 decompression terminates (w/o error) after 900000 bytes
>     try {
>       InputStream iin = new BZip2CompressorInputStream(new FileInputStream(bzip2 compressed file that was uncompressed > 900000 bytes in size);
>       int data = iin.read();
>       while (data != -1) {
>         System.out.print((char) data); ++nBytes;
>         data = iin.read();
>       }
>     } catch (IOException iox) { /**/ }
>     System.out.println("#Bytes read " + nBytes);
> prints: #Bytes read 900000

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COMPRESS-161) bzip2 decompression terminates after 900000 bytes

Posted by "Hans horn (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COMPRESS-161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13146333#comment-13146333 ] 

Hans horn commented on COMPRESS-161:
------------------------------------

Stefan,

I had not bothered looking too closely at the errors I was getting. If I 
had, I'd noticed that I had not provided org.tukaani.
Now with org.tukaani, there're no more problems with common compress xz


Wrt patches for parallel bzip2: I don't understand enough of the subject 
matter to be able to contribute.

Greets,
H.



                
> bzip2 decompression terminates after 900000 bytes
> -------------------------------------------------
>
>                 Key: COMPRESS-161
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-161
>             Project: Commons Compress
>          Issue Type: Bug
>          Components: Compressors
>    Affects Versions: 1.3
>         Environment: Windows7 64bit JDK7u1,2
>            Reporter: Hans horn
>            Priority: Critical
>             Fix For: 1.4
>
>         Attachments: INT1_aminey.inp.bz2
>
>
> bzip2 decompression terminates (w/o error) after 900000 bytes
>     try {
>       InputStream iin = new BZip2CompressorInputStream(new FileInputStream(bzip2 compressed file that was uncompressed > 900000 bytes in size);
>       int data = iin.read();
>       while (data != -1) {
>         System.out.print((char) data); ++nBytes;
>         data = iin.read();
>       }
>     } catch (IOException iox) { /**/ }
>     System.out.println("#Bytes read " + nBytes);
> prints: #Bytes read 900000

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (COMPRESS-161) bzip2 decompression terminates after 900000 bytes

Posted by "Stefan Bodewig (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COMPRESS-161?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefan Bodewig resolved COMPRESS-161.
-------------------------------------

       Resolution: Duplicate
    Fix Version/s:     (was: 1.3)
                   1.4

This is COMPRESS-146 which has just been fixed.

In order to make it work you must use the new two-arg constructor of the stream and pass in true as second argument.

                
> bzip2 decompression terminates after 900000 bytes
> -------------------------------------------------
>
>                 Key: COMPRESS-161
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-161
>             Project: Commons Compress
>          Issue Type: Bug
>          Components: Compressors
>    Affects Versions: 1.3
>         Environment: Windows7 64bit JDK7u1,2
>            Reporter: Hans horn
>            Priority: Critical
>             Fix For: 1.4
>
>         Attachments: INT1_aminey.inp.bz2
>
>
> bzip2 decompression terminates (w/o error) after 900000 bytes
>     try {
>       InputStream iin = new BZip2CompressorInputStream(new FileInputStream(bzip2 compressed file that was uncompressed > 900000 bytes in size);
>       int data = iin.read();
>       while (data != -1) {
>         System.out.print((char) data); ++nBytes;
>         data = iin.read();
>       }
>     } catch (IOException iox) { /**/ }
>     System.out.println("#Bytes read " + nBytes);
> prints: #Bytes read 900000

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COMPRESS-161) bzip2 decompression terminates after 900000 bytes

Posted by "Hans horn (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COMPRESS-161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13145679#comment-13145679 ] 

Hans horn commented on COMPRESS-161:
------------------------------------

Stefan,

just checked out compress trunk.
Due to issues with xz compression it wouldn't build out of the box, but 
that was easily remedied.

Works like a charm decompressing bz2 files that were either created 
using the serial bzip2 as well as using pbzip2.
Thanks again for your efforts.

Btw., are there any plans to add parallel bzip2 
compression/decompression to commons compress taking advantage of 
multiprocessor cpus?

Kindly,
H.



                
> bzip2 decompression terminates after 900000 bytes
> -------------------------------------------------
>
>                 Key: COMPRESS-161
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-161
>             Project: Commons Compress
>          Issue Type: Bug
>          Components: Compressors
>    Affects Versions: 1.3
>         Environment: Windows7 64bit JDK7u1,2
>            Reporter: Hans horn
>            Priority: Critical
>             Fix For: 1.4
>
>         Attachments: INT1_aminey.inp.bz2
>
>
> bzip2 decompression terminates (w/o error) after 900000 bytes
>     try {
>       InputStream iin = new BZip2CompressorInputStream(new FileInputStream(bzip2 compressed file that was uncompressed > 900000 bytes in size);
>       int data = iin.read();
>       while (data != -1) {
>         System.out.print((char) data); ++nBytes;
>         data = iin.read();
>       }
>     } catch (IOException iox) { /**/ }
>     System.out.println("#Bytes read " + nBytes);
> prints: #Bytes read 900000

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COMPRESS-161) bzip2 decompression terminates after 900000 bytes

Posted by "Stefan Bodewig (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COMPRESS-161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13145592#comment-13145592 ] 

Stefan Bodewig commented on COMPRESS-161:
-----------------------------------------

COMPRESS-146 has got a patch attached that I'll look into.  If it fixes the problem with your archive I'm going to commit it.
                
> bzip2 decompression terminates after 900000 bytes
> -------------------------------------------------
>
>                 Key: COMPRESS-161
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-161
>             Project: Commons Compress
>          Issue Type: Bug
>          Components: Compressors
>    Affects Versions: 1.3
>         Environment: Windows7 64bit JDK7u1,2
>            Reporter: Hans horn
>            Priority: Critical
>             Fix For: 1.3
>
>         Attachments: INT1_aminey.inp.bz2
>
>
> bzip2 decompression terminates (w/o error) after 900000 bytes
>     try {
>       InputStream iin = new BZip2CompressorInputStream(new FileInputStream(bzip2 compressed file that was uncompressed > 900000 bytes in size);
>       int data = iin.read();
>       while (data != -1) {
>         System.out.print((char) data); ++nBytes;
>         data = iin.read();
>       }
>     } catch (IOException iox) { /**/ }
>     System.out.println("#Bytes read " + nBytes);
> prints: #Bytes read 900000

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COMPRESS-161) bzip2 decompression terminates after 900000 bytes

Posted by "Stefan Bodewig (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COMPRESS-161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13147117#comment-13147117 ] 

Stefan Bodewig commented on COMPRESS-161:
-----------------------------------------

Good to know trunk is actually buildable outside of my machine and our CI systems.

The "patches welcome" statement is some sort of standard response in OSS land, I didn't seriously expect you to provide a patch.  But I don't have the time or itch to scratch (or current knowledge TBH) to provide one myself right now either.
                
> bzip2 decompression terminates after 900000 bytes
> -------------------------------------------------
>
>                 Key: COMPRESS-161
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-161
>             Project: Commons Compress
>          Issue Type: Bug
>          Components: Compressors
>    Affects Versions: 1.3
>         Environment: Windows7 64bit JDK7u1,2
>            Reporter: Hans horn
>            Priority: Critical
>             Fix For: 1.4
>
>         Attachments: INT1_aminey.inp.bz2
>
>
> bzip2 decompression terminates (w/o error) after 900000 bytes
>     try {
>       InputStream iin = new BZip2CompressorInputStream(new FileInputStream(bzip2 compressed file that was uncompressed > 900000 bytes in size);
>       int data = iin.read();
>       while (data != -1) {
>         System.out.print((char) data); ++nBytes;
>         data = iin.read();
>       }
>     } catch (IOException iox) { /**/ }
>     System.out.println("#Bytes read " + nBytes);
> prints: #Bytes read 900000

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COMPRESS-161) bzip2 decompression terminates after 900000 bytes

Posted by "Stefan Bodewig (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COMPRESS-161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13145558#comment-13145558 ] 

Stefan Bodewig commented on COMPRESS-161:
-----------------------------------------

I think the attached file consists of multiple concatenated streams which Commons Compress doesn't support, yet.  COMPRESS-146
                
> bzip2 decompression terminates after 900000 bytes
> -------------------------------------------------
>
>                 Key: COMPRESS-161
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-161
>             Project: Commons Compress
>          Issue Type: Bug
>          Components: Compressors
>    Affects Versions: 1.3
>         Environment: Windows7 64bit JDK7u1,2
>            Reporter: Hans horn
>            Priority: Critical
>             Fix For: 1.3
>
>         Attachments: INT1_aminey.inp.bz2
>
>
> bzip2 decompression terminates (w/o error) after 900000 bytes
>     try {
>       InputStream iin = new BZip2CompressorInputStream(new FileInputStream(bzip2 compressed file that was uncompressed > 900000 bytes in size);
>       int data = iin.read();
>       while (data != -1) {
>         System.out.print((char) data); ++nBytes;
>         data = iin.read();
>       }
>     } catch (IOException iox) { /**/ }
>     System.out.println("#Bytes read " + nBytes);
> prints: #Bytes read 900000

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira