commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Kodis (Updated) (JIRA)" <>
Subject [jira] [Updated] (COMPRESS-16) unable to extract a TAR file that contains an entry which is 10 GB in size
Date Sun, 27 Nov 2011 15:22:40 GMT


John Kodis updated COMPRESS-16:

    Comment: was deleted

(was: [PATCH 1/2] Accept GNU tar files with entries over 8GB in size.

The tar file format originally stored the size of a file in a 12 byte null-terminated field,
which allowed a maximum file size of 8^11, or 8,589,934,592 bytes.  To accomodate larger files,
later versions of GNU tar will use this same 12 byte field to hold a binary representation
of the file size, denoting this as a binary value by setting the most-significant bit of the
first byte of the field.

[PATCH 2/2] Allow creating tar archives with files over 8GB.

Use the same binary encoding scheme above to allow the creation of tar archives containing
files over 8GB in size.)
> unable to extract a TAR file that contains an entry which is 10 GB in size
> --------------------------------------------------------------------------
>                 Key: COMPRESS-16
>                 URL:
>             Project: Commons Compress
>          Issue Type: Bug
>          Components: Archivers
>         Environment: I am using win xp sp3, but this should be platform independent.
>            Reporter: Sam Smith
>         Attachments: 0001-Accept-GNU-tar-files-with-entries-over-8GB-in-size.patch, 0002-Allow-creating-tar-archives-with-files-over-8GB.patch,
ant-8GB-tar.patch, patch-for-compress.txt
> I made a TAR file which contains a file entry where the file is 10 GB in size.
> When I attempt to extract the file using TarInputStream, it fails with the following
stack trace:
> unexpected EOF with 24064 bytes unread
> 		at
> 		at org.apache.commons.compress.archivers.tar.TarInputStream.copyEntryContents(
> So, TarInputStream does not seem to support large (> 8 GB?) files.
> Here is something else to note: I created that TAR file using TarOutputStream , which
did not complain when asked to write a 10 GB file into the TAR file, so I assume that TarOutputStream
has no file size limits?  That, or does it silently create corrupted TAR files (which would
be the worst situation of all...)?

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message