Uploaded image for project: 'Commons Compress'
  1. Commons Compress
  2. COMPRESS-514

SevenZFile fails with encoded header over 2GiB

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.20
    • None
    • Archivers
    • None

    Description

      When reading what some may call a large encrypted 7zip file (1.2TB with 22 million files), the read fails at the header stage with the trace below. Is this within the spec? I've written some code to handle it, because I did actually need to extract the file in java. If that's of any use I can provide it (it's a naive wrapper that just pages in a buffer at a time).

       

      Exception in thread "main" java.io.IOException: Cannot handle unpackSize2416988886
      at org.apache.commons.compress.archivers.sevenz.SevenZFile.assertFitsIntoInt(SevenZFile.java:1523)
      at org.apache.commons.compress.archivers.sevenz.SevenZFile.readEncodedHeader(SevenZFile.java:622)
      at org.apache.commons.compress.archivers.sevenz.SevenZFile.initializeArchive(SevenZFile.java:532)
      at org.apache.commons.compress.archivers.sevenz.SevenZFile.readHeaders(SevenZFile.java:468)
      at org.apache.commons.compress.archivers.sevenz.SevenZFile.<init>(SevenZFile.java:337)
      at org.apache.commons.compress.archivers.sevenz.SevenZFile.<init>(SevenZFile.java:129)
      at org.apache.commons.compress.archivers.sevenz.SevenZFile.<init>(SevenZFile.java:116)
      

      7zip itself can also open it (and display/extract etc.), here are the stats:

       

       

      Size: 2 489 903 580 875
      Packed Size: 1 349 110 308 832
      Folders: 40 005
      Files: 22 073 957
      CRC: E26F6A96
      

      Attachments

        1. HeaderChannelBuffer.java
          6 kB
          A Kelday

        Issue Links

          Activity

            People

              Unassigned Unassigned
              akelday A Kelday
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2.5h
                  2.5h