[ https://issues.apache.org/jira/browse/COMPRESS-124?focusedWorklogId=351558&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-351558 ]
ASF GitHub Bot logged work on COMPRESS-124: ------------------------------------------- Author: ASF GitHub Bot Created on: 30/Nov/19 19:47 Start Date: 30/Nov/19 19:47 Worklog Time Spent: 10m Work Description: bodewig commented on issue #87: COMPRESS-124 : Add support for extracting sparse entries from tar archives URL: https://github.com/apache/commons-compress/pull/87#issuecomment-560015609 First of all, many thanks @PeterAlfreadLee I agree with @tcurdt that providing the functionality via a single `TarArchiveInputStream` would be preferable. Maybe we could extract the meet of the read and skip methods into strategy implementations and make the handling of sparse entries another strategy that is triggered when reading said type of entry? That way we could extend the class without making it even more complex itself. Here I'm just thinking loud, I haven't got any code to show or even just tried to sketch it up. I must admit I haven't even looked at the code in detail, so maybe the idea is complete nonsense. BTW, star is a pretty old tar implementation by Jörg Schilling that used to be pretty popular before POSIX started to add support for many of the shortcoming that GNU tar addressed in its own way - long file names, big files, non-ASCII file names and all that. It is still available via Sourceforge, I found the manual page at http://schilytools.sourceforge.net/man/man1/star.1.html . IIRC it is BSD licensed so was preferred over GNU tar by the BSDs and some other Unices. ---------------------------------------------------------------- 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: 351558) Time Spent: 2h 50m (was: 2h 40m) > Unable to extract a sparse entries from tar archives > ---------------------------------------------------- > > Key: COMPRESS-124 > URL: https://issues.apache.org/jira/browse/COMPRESS-124 > Project: Commons Compress > Issue Type: New Feature > Components: Archivers > Affects Versions: 1.1, 1.2 > Environment: Platform independent. However, I'm currently using > Window 7 Enterprise. > Reporter: Patrick Dreyer > Priority: Major > Labels: tar > Attachments: gnuSparseFile.patch > > Time Spent: 2h 50m > Remaining Estimate: 0h > > Good news first: I already have the patch ready for that. > I got several TAR files which I could not extract with any of the existing > Java implementations, but I could extract all those TAR files successfully > with GNU tar. > It turned out that all the failing TAR files contained so called sparse > files. Investigating the source code of all existing Java TAR implementations > showed me that none of them even recognizes the existence of GNU sparse > entries. > Actually, I don't need to process one of the contained sparse files and I'm > happy if I'm at least able to correctly untar all the non-sparsed files. > Thus, it would be sufficient recognizing sparse files without the need to > correctly un-sparse them while extracting. As long as all non-sparsed files > get extracted correctly, I'm fine. > The TAR files in question have all been VMware Diagnostic File bundles. > See > http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=653 > to know how to get them. -- This message was sent by Atlassian Jira (v8.3.4#803005)