[ 
https://issues.apache.org/jira/browse/COMPRESS-477?focusedWorklogId=351744&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-351744
 ]

ASF GitHub Bot logged work on COMPRESS-477:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 02/Dec/19 05:14
            Start Date: 02/Dec/19 05:14
    Worklog Time Spent: 10m 
      Work Description: bodewig commented on pull request #84: COMPRESS-477 Add 
support for extracting splitted zip files
URL: https://github.com/apache/commons-compress/pull/84#discussion_r341816324
 
 

 ##########
 File path: 
src/main/java/org/apache/commons/compress/utils/ZipSplitSegmentComparator.java
 ##########
 @@ -0,0 +1,45 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.commons.compress.utils;
+
+import org.apache.commons.compress.compressors.FileNameUtil;
+
+import java.io.File;
+import java.util.Comparator;
+
+public class ZipSplitSegmentComparator implements Comparator<File> {
 
 Review comment:
   I'd probably make that an inner class of 
`ZipSplitReadOnlySeekableByteChannel` but haven't got any strong opinion either 
way.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 351744)
    Time Spent: 5h 40m  (was: 5.5h)

> Support for splitted zip files
> ------------------------------
>
>                 Key: COMPRESS-477
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-477
>             Project: Commons Compress
>          Issue Type: New Feature
>          Components: Archivers
>    Affects Versions: 1.18
>            Reporter: Luís Filipe Nassif
>            Priority: Major
>              Labels: zip
>             Fix For: 1.20
>
>          Time Spent: 5h 40m
>  Remaining Estimate: 0h
>
> It would be very useful to support splitted zip files. I've read 
> [https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT] and understood 
> that simply concatenating the segments and removing the split signature 
> 0x08074b50 from first segment would be sufficient, but it is not that simple 
> because compress fails with exception below:
> {code}
> Caused by: java.util.zip.ZipException: archive's ZIP64 end of central 
> directory locator is corrupt.
>  at 
> org.apache.commons.compress.archivers.zip.ZipFile.positionAtCentralDirectory64(ZipFile.java:924)
>  ~[commons-compress-1.18.jar:1.18]
>  at 
> org.apache.commons.compress.archivers.zip.ZipFile.positionAtCentralDirectory(ZipFile.java:901)
>  ~[commons-compress-1.18.jar:1.18]
>  at 
> org.apache.commons.compress.archivers.zip.ZipFile.populateFromCentralDirectory(ZipFile.java:621)
>  ~[commons-compress-1.18.jar:1.18]
>  at 
> org.apache.commons.compress.archivers.zip.ZipFile.<init>(ZipFile.java:295) 
> ~[commons-compress-1.18.jar:1.18]
>  at 
> org.apache.commons.compress.archivers.zip.ZipFile.<init>(ZipFile.java:280) 
> ~[commons-compress-1.18.jar:1.18]
>  at 
> org.apache.commons.compress.archivers.zip.ZipFile.<init>(ZipFile.java:236) 
> ~[commons-compress-1.18.jar:1.18]
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to