[ 
https://issues.apache.org/jira/browse/COMPRESS-465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16623939#comment-16623939
 ] 

Stefan Bodewig edited comment on COMPRESS-465 at 9/21/18 5:47 PM:
------------------------------------------------------------------

When a file uses the data descriptor then the entry's size is stored after the 
entry's content. {{ZipArchiveInputStream}} tries to read the content until it 
finds something that looks like a data descriptor or the next zip entry. If the 
content of the archive is again a ZIP file then it will find a "next entry" 
which will not be the next entry of the outer archive but some part of the 
inner archive. This is the case for STORED entries.

The data descriptor has been designed for compression formats that can signal 
"end of data" themselves, DEFLATE can do so, as can many of the other real 
compression algorithms, For them {{ZipArchiveInputStream}} has the compressor 
stream read data until the end is reached and then picks up the data descriptor 
where the compressor has stopped.


was (Author: bodewig):
When a file uses the data descriptor then the entry's size is stored after the 
entry's content. {{ZipArchiveInputStream}} tries to read the content until it 
finds something that looks like a data descriptor or the next zip entry. If the 
content of the archive is again a ZIP file then it will find a "next entry" 
which will not be the next entry of the outer archive but some part of the 
inner archive.

> Unexpected record signature: 0X6F4A2D4E
> ---------------------------------------
>
>                 Key: COMPRESS-465
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-465
>             Project: Commons Compress
>          Issue Type: Bug
>          Components: Archivers
>    Affects Versions: 1.18
>            Reporter: Luis Filipe Nassif
>            Priority: Major
>         Attachments: test.zip
>
>
> Hi,
> Commons compress is not recognizing all entries from zip files downloaded 
> from mega.nz cloud, when you choose to download several files as a zip 
> archive. Others archivers like 7zip and Windows Explorer are able to read all 
> zip content. Example attached.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to