PeterAlfreadLee commented on a change in pull request #87: COMPRESS-124 : Add 
support for extracting sparse entries from tar archives
URL: https://github.com/apache/commons-compress/pull/87#discussion_r355100382
 
 

 ##########
 File path: 
src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStream.java
 ##########
 @@ -516,6 +713,22 @@ private void paxHeaders() throws IOException{
                                 final String value = new String(rest, 0,
                                                           restLen - 1, 
CharsetNames.UTF_8);
                                 headers.put(keyword, value);
+
+                                // for 0.0 PAX Headers
+                                if(keyword.equals("GNU.sparse.offset")) {
+                                    sparseHeader = new 
TarArchiveStructSparse(Long.parseLong(value), 0);
 
 Review comment:
   Agree. There're some other keys exist in `TarArchiveEntry`, like this:
   
   
[TarArchiveEntry](https://github.com/apache/commons-compress/blob/master/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveEntry.java#L1126-L1129)
   
   I'm wondering if a refactor is needed or not for the existing code.

----------------------------------------------------------------
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


With regards,
Apache Git Services

Reply via email to