Apache Commons logo Commons Compress


Release History

Version Date Description
1.14 2017-05-14 Release 1.14
1.13 2016-12-29 Release 1.13 - API compatible to 1.12 but requires Java 7 at runtime.
1.12 2016-06-21 Release 1.12 - API compatible to 1.11 but requires Java 6 at runtime. ------------ Release 1.12 changes the behavior of BZip2CompressorOutputStream's finalize method so that it no longer invokes finish. This is going to break code that relied on the finalizer to clean up an unfinished stream. The code will need to be changed to call finish or close itself. Note that a finalizer is not guaranteed to run, so the feature was not 100% effective in any case.
1.11 2016-04-06 Release 1.11
1.10 2015-08-18 Release 1.10 ------------ Release 1.10 moves the former org.apache.commons.compress.compressors.z._internal_ package which breaks backwards compatibility for code which used the old package. This also changes the superclass of ZCompressorInputStream.
1.9 2014-10-09 Release 1.9
1.8.1 2014-05-14 Release 1.8.1
1.8 2014-03-12 Release 1.8
1.7 2014-01-20 Release 1.7
1.6 2013-10-26 Release 1.6
1.5 2013-03-14 Release 1.5
1.4.1 2012-05-23 Release 1.4.1
1.4 2012-04-11 Release 1.4
1.3 2011-11-01 Release 1.3 - API compatible to 1.2 but requires Java5 at runtime
1.2 2011-07-31 Release 1.2 - a bugfix release, the last release expected to be compatible with Java 1.4
1.1 2010-08-13 Release 1.1
1.0 2009-05-21 First Public Release

Release 1.14 – 2017-05-14

Type Changes By
Fix SnappyCompressorInputStream slides the window too early leading to ArrayIndexOutOfBoundsExceptions for some streams. Fixes COMPRESS-378.
Add Added write support for Snappy. Fixes COMPRESS-246.
Update The blocksize for FramedSnappyCompressorInputStream can now be configured as some IWA files seem to be using blocks larger than the default 32k. Fixes COMPRESS-358.
Fix ZipArchiveEntry#isUnixSymlink now only returns true if the corresponding link flag is the only file-type flag set. Fixes COMPRESS-379. Thanks to Guillaume Boué.
Add Added support for LZ4 (block and frame format). Fixes COMPRESS-271.
Update BZip2CompressorInputstream now uses BitInputStream internally. Pull Request #13. Thanks to Thomas Meyer.
Fix Fixed an integer overflow in CPIO's CRC calculation. Pull Request #17. Thanks to Daniel Collin.
Add Add static detect(InputStream in) to CompressorStreamFactory and ArchiveStreamFactory. Fixes COMPRESS-385.
Fix Make unit tests work on Windows paths with spaces in their names. Fixes COMPRESS-387.
Update Improved performance for concurrent reads from ZipFile when reading from a file. Fixes COMPRESS-388. Thanks to Zbynek Vyskovsky.
Add Added a way to limit amount of memory ZCompressorStream may use. Fixes COMPRESS-382. Thanks to Tim Allison.
Add Added a way to limit amount of memory ZCompressorStream may use. Fixes COMPRESS-386. Thanks to Tim Allison.
Add Added a way to limit amount of memory LZMACompressorStream and XZCompressorInputStream may use. Fixes COMPRESS-382. Thanks to Tim Allison.
Fix Internal location pointer in ZipFile could get incremented even if nothing had been read. Fixes COMPRESS-389.
Add Add Brotli decoder based on the Google Brotli library. Fixes COMPRESS-392. Thanks to Philippe Mouawad.
Add ZipEntry now exposes its data offset. Fixes COMPRESS-390. Thanks to Zbynek Vyskovsky.
Fix LZMACompressorOutputStream#flush would throw an exception rather than be the NOP it promised to be. Fixes COMPRESS-393.
Add Using ZipArchiveEntry's setAlignment it is now possible to ensure the data offset of an entry starts at a file position that at word or page boundaries. A new extra field has been added for this purpose. Fixes COMPRESS-391. Thanks to Zbynek Vyskovsky.

Release 1.13 – 2016-12-29

Type Changes By
Update Update Java requirement from 6 to 7. Fixes COMPRESS-360. ggregory
Fix BitInputStream could return bad results when overflowing internally - if two consecutive reads tried to read more than 64 bits. Fixes COMPRESS-363.
Update Clarified which TarArchiveEntry methods are useless for entries read from an archive. Fixes COMPRESS-366.
Fix ZipArchiveInputStream.closeEntry does not properly advance to next entry if there are junk bytes at end of data section. Fixes COMPRESS-364. Thanks to Mike Mole.
Add SevenZFile, SevenZOutputFile, ZipFile and ZipArchiveOutputStream can now work on non-file resources if they can be accessed via SeekableByteChannel. Fixes COMPRESS-327.
Add Allow compressor extensions through a standard JRE ServiceLoader. Fixes COMPRESS-368.
Add Allow archive extensions through a standard JRE ServiceLoader. Fixes COMPRESS-369.
Add Add write support for the legacy LZMA format, this requires XZ for Java 1.6. Fixes COMPRESS-373.
Add Add write support for the legacy LZMA stream to 7z, this requires XZ for Java 1.6. Fixes COMPRESS-374.
Add Allow the clients of ParallelScatterZipCreator to provide ZipArchiveEntryRequestSupplier. Fixes COMPRESS-375. Thanks to Plamen Totev.
Fix ZipArchiveInputStream now throws an Exception if it encounters a broken ZIP archive rather than signaling end-of-archive. Fixes COMPRESS-367. Thanks to Mike Mole.
Fix ScatterZipOutputStream didn't close the StreamCompressor causing a potential resource leak. Fixes COMPRESS-377.
Add Add a version-independent link to the API docs of the latest release. Fixes COMPRESS-372.

Release 1.12 – 2016-06-21

Type Changes By
Update Update requirement from Java 5 to 6. Fixes COMPRESS-349. ggregory
Update TarArchiveEntry wastefully allocates empty arrays. Fixes COMPRESS-350. ggregory
Fix SevenZFile.read() throws an IllegalStateException for empty entries. Fixes COMPRESS-348.
Update Javadoc for BZip2CompressorInputStream(InputStream, boolean) should refer to IOEx, not NPE. Fixes COMPRESS-353. ggregory
Update PureJavaCrc32C in the snappy package is now final so it is now safe to call a virtual method inside the constructor. Fixes COMPRESS-354.
Fix TarArchiveInputStream failed to parse PAX headers that included blank lines. Fixes COMPRESS-355. Thanks to Jeremy Gustie.
Fix TarArchiveInputStream failed to parse PAX headers whose tar entry name ended with a slash. Fixes COMPRESS-356. Thanks to Jeremy Gustie.
Add FramedSnappyCompressorInputStream now supports the dialect of Snappy used by the IWA files contained within the zip archives used in Apple's iWork 13 files. Fixes COMPRESS-352.
Update ZipArchiveInputStream and CpioArchiveInputStream could throw exceptions who's messages contained potentially corrupt entry names read from a broken archive. They will now sanitize the names by replacing unprintable characters and restricting the length to 255 characters. Fixes COMPRESS-351.
Update BZip2CompressorOutputStream no longer tries to finish the output stream in finalize. This is a breaking change for code that relied on the finalizer. Fixes COMPRESS-357.

Release 1.11 – 2016-04-06

Type Changes By
Add TarArchiveInputStream now supports reading global PAX headers. Fixes COMPRESS-347.
Add The PAX headers for sparse entries written by star are now applied. Fixes COMPRESS-346.
Add GNU sparse files using one of the PAX formats are now detected, but cannot be extracted. Fixes COMPRESS-345.
Fix ArArchiveInputStream can now read GNU extended names that are terminated with a NUL byte rather than a linefeed. Fixes COMPRESS-344.
Add New method SevenZFile.getEntries can be used to list the contents of a 7z archive. Fixes COMPRESS-341.
Fix Native Memory Leak in Sevenz-DeflateDecoder. Fixes COMPRESS-343. Thanks to Rene Preissel.
Add When using Zip64Mode.Always also use ZIP64 extensions inside the central directory. GitHub Pull Request #10 Thanks to Matt Hovey.
Fix SevenZFile will now only try to drain an entry's content when moving on to the next entry if data is read from the next entry. This should improve performance for applications that try to skip over entries. Fixes COMPRESS-340. Thanks to Dawid Weiss.
Fix file names of tar archives using the xstar format are now parsed properly. Fixes COMPRESS-336.
Fix checksums of tars that pad the checksum field to the left are now calculated properly. Fixes COMPRESS-335.
Fix ArArchiveInputStream failed to read past the first entry when BSD long names have been used. Fixes COMPRESS-334. Thanks to Jeremy Gustie.
Fix Added buffering for random access which speeds up 7Z support. Fixes COMPRESS-333. Thanks to Dawid Weiss.
Fix The checksum validation of TararchiveEntry is now as strict as the validation of GNU tar, which eliminates a few cases of false positives of ArchiveStreamFactory. This behavior is a breaking change since the check has become more strict but any archive that fails the checksum test now would also fail it when extracted with other tools and must be considered an invalid archive. Fixes COMPRESS-331.
Add ZipFile.getRawInputStream() is now part of the public API. Fixes COMPRESS-323.
Fix SnappyCompressorInputStream and FramedSnappyCompressorInputStream returned 0 at the end of the stream under certain circumstances. Fixes COMPRESS-332.
Add Allow byte-for-byte replication of Zip entries. GitHub Pull Request #6. Thanks to Jason van Zyl.
Add TarArchiveEntry's preserveLeadingSlashes is now a property and used on later calls to setName, too. This behavior is a breaking change. Fixes COMPRESS-328.
Fix Adjusted unit test to updates in Java8 and later that change the logic of ZipEntry#getTime. Fixes COMPRESS-326.
Fix TarArchiveOutputStream will now recognize GNU long name and link entries even if the special entry has a different name than GNU tar uses itself. This seems to be the case for archives created by star. Fixes COMPRESS-324.
Fix ArrayIndexOutOfBoundsException when InfoZIP type 7875 extra fields are read from the central directory. Fixes COMPRESS-321.
Add Added read-only support for bzip2 compression used inside of ZIP archives. GitHub Pull Request #4. Thanks to Sören Glimm.

Release 1.10 – 2015-08-18

Type Changes By
Fix ArrayIndexOutOfBoundsException when ZIP extra fields are read and the entry contains an UnparseableExtraField. Fixes COMPRESS-317. Thanks to Lucas Werkmeister.
Add CompressorStreamFactory can now auto-detect DEFLATE streams with ZLIB header. Fixes COMPRESS-316. Thanks to Nick Burch.
Fix TarArchiveInputStream can now read entries with group or user ids > 0x80000000. Fixes COMPRESS-314.
Fix TarArchiveOutputStream can now write entries with group or user ids > 0x80000000. Fixes COMPRESS-315.
Add CompressorStreamFactory can now auto-detect LZMA streams. Fixes COMPRESS-313.
Fix TarArchiveEntry's constructor with a File and a String arg didn't normalize the name. Fixes COMPRESS-312.
Fix ZipEncodingHelper no longer reads system properties directly to determine the default charset. Fixes COMPRESS-308.
Fix BZip2CompressorInputStream#read would return -1 when asked to read 0 bytes. Fixes COMPRESS-309.
Fix ArchiveStreamFactory fails to pass on the encoding when creating some streams. * ArjArchiveInputStream * CpioArchiveInputStream * DumpArchiveInputStream * JarArchiveInputStream * TarArchiveInputStream * JarArchiveOutputStream. Fixes COMPRESS-306.
Fix Restore immutability/thread-safety to ArchiveStreamFactory. The class is now immutable provided that the method setEntryEncoding is not used. The class is thread-safe. Fixes COMPRESS-302.
Fix Restore immutability/thread-safety to CompressorStreamFactory. The class is now immutable provided that the method setDecompressConcatenated is not used. The class is thread-safe. Fixes COMPRESS-303.
Fix SevenZFile now throws the specific PasswordRequiredException when it encounters an encrypted stream but no password has been specified. Fixes COMPRESS-298.
Fix Improved error message when tar encounters a groupId that is too big to write without using the STAR or POSIX format. Fixes COMPRESS-290. Thanks to Kristian Rosenvold.
Add Added support for parallel compression. This low-level API allows a client to build a zip/jar file by using the class org.apache.commons.compress.archivers.zip.ParallelScatterZipCreator. Zip documentation updated with further notes about parallel features. Please note that some aspects of jar creation need to be handled by client code and is not part of commons-compress for this release. Fixes COMPRESS-296. Thanks to Kristian Rosenvold.
Add Cut overall object instantiation in half by changing file header generation algorithm, for a 10-15 percent performance improvement. Also extracted two private methods createLocalFileHeader and createCentralFileHeader in ZipArchiveOutputStream. These may have some interesting additional usages in the near future. Thanks to Kristian Rosenvold.
Fix ZipFile logs a warning in its finalizer when its constructor has thrown an exception reading the file - for example if the file doesn't exist. Fixes COMPRESS-297.
Add New methods in ZipArchiveOutputStream and ZipFile allows entries to be copied from one archive to another without having to re-compress them. Fixes COMPRESS-295. Thanks to Kristian Rosenvold.
Update Moved the package org.apache.commons.compress.compressors.z._internal_ to org.apache.commons.compress.compressors.lzw and made it part of the API that is officially supported. This will break existing code that uses the old package. Thanks to Damjan Jovanovic.

Release 1.9 – 2014-10-09

Type Changes By
Add Added support for DEFLATE streams without any gzip framing. Fixes COMPRESS-263. Thanks to Matthias Stevens.
Fix When reading 7z files unknown file properties and properties of type kDummy are now ignored. Fixes COMPRESS-287.
Fix Expanding 7z archives using LZMA compression could cause an EOFException. Fixes COMPRESS-286.
Update Checking for XZ for Java may be expensive. The result will now be cached outside of an OSGi environment. You can use the new XZUtils#setCacheXZAvailability to overrride this default behavior. Fixes COMPRESS-285.
Fix Long-Name and -link or PAX-header entries in TAR archives always had the current time as last modfication time, creating archives that are different at the byte level each time an archive was built. Fixes COMPRESS-289. Thanks to Bob Robertson.

Release 1.8.1 – 2014-05-14

Type Changes By
Update The dependency on org.tukaani:xz is now marked as optional.
Fix The snappy, ar and tar inputstreams might fail to read from a non-buffered stream in certain cases. Fixes COMPRESS-270.
Add CompressorStreamFactory can now auto-detect Unix compress (".Z") streams. Fixes COMPRESS-272.
Fix IOUtils#skip might skip fewer bytes than requested even though more could be read from the stream. Fixes COMPRESS-277.
Fix ArchiveStreams now validate there is a current entry before reading or writing entry data. Fixes COMPRESS-276.
Fix ArjArchiveInputStream#canReadEntryData tested the current entry of the stream rather than its argument.
Fix ChangeSet#delete and deleteDir now properly deal with unnamed entries. Fixes COMPRESS-274.
Fix Added a few null checks to improve robustness. Fixes COMPRESS-273.
Fix TarArchiveInputStream failed to read archives with empty gid/uid fields. Fixes COMPRESS-278.
Fix TarArchiveInputStream now again throws an exception when it encounters a truncated archive while reading from the last entry. Fixes COMPRESS-279.
Fix Adapted TarArchiveInputStream#skip to the modified IOUtils#skip method. Fixes COMPRESS-280. Thanks to BELUGA BEHR.

Release 1.8 – 2014-03-12

Type Changes By
Fix BZip2CompressorInputStream read fewer bytes than possible from a truncated stream. Fixes COMPRESS-253.
Fix SevenZFile failed claiming the dictionary was too large when archives used LZMA compression for headers and content and certain non-default dictionary sizes. Fixes COMPRESS-253.
Fix CompressorStreamFactory.createCompressorInputStream with explicit compression did not honor decompressConcatenated. Fixes COMPRESS-259.
Add GzipCompressorInputStream now provides access to the same metadata that can be provided via GzipParameters when writing a gzip stream. Fixes COMPRESS-260.
Fix TarArchiveInputStream will now read archives created by tar implementations that encode big numbers by not adding a trailing NUL. Fixes COMPRESS-262.
Fix ZipArchiveInputStream would return NUL bytes for the first 512 bytes of a STORED entry if it was the very first entry of the archive. Fixes COMPRESS-264.
Fix When writing PAX/POSIX headers for TAR entries with backslashes or certain non-ASCII characters in their name TarArchiveOutputStream could fail. Fixes COMPRESS-265.
Fix ArchiveStreamFactory now throws a StreamingNotSupported - a new subclass of ArchiveException - if it is asked to read from or write to a stream and Commons Compress doesn't support streaming for the format. This currently only applies to the 7z format. Fixes COMPRESS-267.
Add SevenZOutputFile now supports chaining multiple compression/encryption/filter methods and passing options to the methods. Fixes COMPRESS-266.
Add The (compression) method(s) can now be specified per entry in SevenZOutputFile. Fixes COMPRESS-261.
Add SevenZArchiveEntry "knows" which method(s) have been used to write it to the archive. Fixes COMPRESS-258.
Add The 7z package now supports the delta filter as method.
Add The 7z package now supports BCJ filters for several platforms. You will need a version >= 1.5 of XZ for Java to read archives using BCJ, though. Fixes COMPRESS-257.

Release 1.7 – 2014-01-20

Type Changes By
Fix SevenZOutputFile#closeArchiveEntry throws an exception when using LZMA2 compression on Java8. Fixes COMPRESS-241.
Add Read-Only support for Snappy compression. Fixes COMPRESS-147. Thanks to BELUGA BEHR.
Fix 7z reading of big 64bit values could be wrong. Fixes COMPRESS-244. Thanks to Nico Kruber.
Add Read-Only support for .Z compressed files. Fixes COMPRESS-243. Thanks to Damjan Jovanovic.
Add ZipFile and ZipArchiveInputStream now support reading entries compressed using the SHRINKING method. Thanks to Damjan Jovanovic.
Fix TarArchiveInputStream could fail to read an archive completely. Fixes COMPRESS-245.
Fix The time-setters in X5455_ExtendedTimestamp now set the corresponding flags explicitly - i.e. they set the bit if the valus is not-null and reset it otherwise. This may cause incompatibilities if you use setFlags to unset a bit and later set the time to a non-null value - the flag will now be set. Fixes COMPRESS-242.
Add GzipCompressorOutputStream now supports setting the compression level and the header metadata (filename, comment, modification time, operating system and extra flags). Fixes COMPRESS-250. Thanks to Emmanuel Bourg.
Add ZipFile and ZipArchiveInputStream now support reading entries compressed using the IMPLODE method. Fixes COMPRESS-115. Thanks to Emmanuel Bourg.
Fix SevenZOutputFile would create invalid archives if more than six empty files or directories were included. Fixes COMPRESS-252.
Add ZipFile and the 7z file classes now implement Closeable and can be used in try-with-resources constructs.

Release 1.6 – 2013-10-26

Type Changes By
Fix TarBuffer.tryToConsumeSecondEOFRecord could throw a NullPointerException. Fixes COMPRESS-223. Thanks to Jeremy Gustie.
Add Added support for 7z archives. Most compression algorithms can be read and written, LZMA and encryption are only supported when reading. Fixes COMPRESS-54. Thanks to Damjan Jovanovic.
Add Added read-only support for ARJ archives that don't use compression. Fixes COMPRESS-226. Thanks to Damjan Jovanovic.
Fix Parsing of zip64 extra fields has become more lenient in order to be able to read archives created by DotNetZip and maybe other archivers as well. Fixes COMPRESS-228.
Fix TAR will now properly read the names of symbolic links with long names that use the GNU variant to specify the long file name. Fixes COMPRESS-229. Thanks to Christoph Gysin.
Fix ZipFile#getInputStream could return null if the archive contained duplicate entries. The class now also provides two new methods to obtain all entries of a given name rather than just the first one. Fixes COMPRESS-227.
Update Readabilty patch to TarArchiveInputStream. Fixes COMPRESS-232. Thanks to BELUGA BEHR.
Update Performance improvements to TarArchiveInputStream, in particular to the skip method. Fixes COMPRESS-234. Thanks to BELUGA BEHR.
Fix CpioArchiveInputStream failed to read archives created by Redline RPM. Fixes COMPRESS-236. Thanks to Andrew Duffy.
Fix TarArchiveOutputStream now properly handles link names that are too long to fit into a traditional TAR header. Fixes COMPRESS-237. Thanks to Emmanuel Bourg.
Add DumpArchiveInputStream now supports an encoding parameter that can be used to specify the encoding of file names.
Add The CPIO streams now support an encoding parameter that can be used to specify the encoding of file names.
Add Read-only support for LZMA standalone compression has been added. Fixes COMPRESS-111.
Fix The auto-detecting create*InputStream methods of Archive and CompressorStreamFactory could fail to detect the format of blocking input streams. Fixes COMPRESS-239.
Fix ZipEncodingHelper.isUTF8(String) does not check all UTF-8 aliases. Fixes COMPRESS-240. Thanks to Gary Gregory.

Release 1.5 – 2013-03-14

Type Changes By
Fix Typo in CompressorStreamFactory Javadoc. Fixes COMPRESS-218. Thanks to Gili.
Update Improved exception message if a zip archive cannot be read because of an unsupported compression method. Fixes COMPRESS-188. Thanks to Harald Kuhn.
Update ArchiveStreamFactory has a setting for file name encoding that sets up encoding for ZIP and TAR streams. Fixes COMPRESS-192. Thanks to Jukka Zitting.
Fix ArchiveStreamFactory's tar stream detection created false positives for AIFF files. Fixes COMPRESS-191. Thanks to Jukka Zitting.
Update TarArchiveEntry now has a method to verify its checksum. Fixes COMPRESS-191. Thanks to Jukka Zitting.
Fix XZ for Java didn't provide an OSGi bundle. Compress' dependency on it has now been marked optional so Compress itself can still be used in an OSGi context. Fixes COMPRESS-199. Thanks to Jukka Zitting.
Fix When specifying the encoding explicitly TarArchiveOutputStream would write unreadable names in GNU mode or even cause errors in POSIX mode for file names longer than 66 characters. Fixes COMPRESS-200. Thanks to Christian Schlichtherle.
Fix Writing TAR PAX headers failed if the generated entry name ended with a "/". Fixes COMPRESS-203.
Fix ZipArchiveInputStream sometimes failed to provide input to the Inflater when it needed it, leading to reads returning 0. Fixes COMPRESS-189. Thanks to Daniel Lowe.
Update Split/spanned ZIP archives are now properly detected by ArchiveStreamFactory but will cause an UnsupportedZipFeatureException when read.
Update ZipArchiveInputStream now reads archives that start with a "PK00" signature. Archives with this signatures are created when the archiver was willing to split the archive but in the end only needed a single segment - so didn't split anything. Fixes COMPRESS-208.
Update TarArchiveEntry has a new constructor that allows setting linkFlag and preserveLeadingSlashes at the same time. Fixes COMPRESS-201.
Update ChangeSetPerformer has a new perform overload that uses a ZipFile instance as input. Fixes COMPRESS-159.
Fix TarArchiveInputStream ignored the encoding for GNU long name entries. Fixes COMPRESS-212.
Update Garbage collection pressure has been reduced by reusing temporary byte arrays in classes. Fixes COMPRESS-172. Thanks to Thomas Mair.
Update Can now handle zip extra field 0x5455 - Extended Timestamp. Fixes COMPRESS-210. Thanks to Julius Davies.
Update handle zip extra field 0x7875 - Info Zip New Unix Extra Field. Fixes COMPRESS-211. Thanks to Julius Davies.
Update ZipShort, ZipLong, ZipEightByteInteger should implement Serializable. Fixes COMPRESS-213. Thanks to Julius Davies.
Update better support for unix symlinks in ZipFile entries. Fixes COMPRESS-214. Thanks to Julius Davies.
Update ZipFile's initialization has been improved for non-Zip64 archives. Fixes COMPRESS-215. Thanks to Robin Power.
Fix TarArchiveInputStream could leave the second EOF record inside the stream it had just finished reading. Fixes COMPRESS-206. Thanks to Peter De Maeyer.
Fix DumpArchiveInputStream no longer implicitly closes the original input stream when it reaches the end of the archive.
Fix ZipArchiveInputStream now consumes the remainder of the archive when getNextZipEntry returns null.
Fix Unit tests could fail if the source tree was checked out to a directory tree containign spaces. Fixes COMPRESS-205. Thanks to Daniel Lowe.
Update Updated XZ for Java dependency to 1.2 as this version provides proper OSGi manifest attributes.
Fix Fixed a potential ArrayIndexOutOfBoundsException when reading STORED entries from ZipArchiveInputStream. Fixes COMPRESS-219.
Fix CompressorStreamFactory can now be used without XZ for Java being available. Fixes COMPRESS-221.
Add CompressorStreamFactory has an option to create decompressing streams that decompress the full input for formats that support multiple concatenated streams. Fixes COMPRESS-220.

Release 1.4.1 – 2012-05-23

Type Changes By
Fix Ported libbzip2's fallback sort algorithm to BZip2CompressorOutputStream to speed up compression in certain edge cases. Using specially crafted inputs this can be used as a denial of service attack. See the security reports page for details.

Release 1.4 – 2012-04-11

Type Changes By
Fix The tar package now allows the encoding of file names to be specified and can optionally use PAX extension headers to write non-ASCII file names. The stream classes now write (or expect to read) archives that use the platform's native encoding for file names. Apache Commons Compress 1.3 used to strip everything but the lower eight bits of each character which effectively only worked for ASCII and ISO-8859-1 file names. This new default behavior is a breaking change. Fixes COMPRESS-183.
Fix TarArchiveInputStream failed to parse PAX headers that contained non-ASCII characters. Fixes COMPRESS-184.
Update The tar package can now write archives that use star/GNU/BSD extensions or use the POSIX/PAX variant to store numeric values that don't fit into the traditional header fields. Fixes COMPRESS-182.
Update Added a workaround for a Bug some tar implementations that add a NUL byte as first byte in numeric header fields. Fixes COMPRESS-181.
Update Added a workaround for a Bug in WinZIP which uses backslashes as path separators in Unicode Extra Fields. Fixes COMPRESS-176.
Update ArrayOutOfBounds while decompressing bz2. Added test case - code already seems to have been fixed. Fixes COMPRESS-131.
Fix TarArchiveInputStream throws IllegalArgumentException instead of IOException. Fixes COMPRESS-178.
Fix TarUtils.formatLongOctalOrBinaryBytes() assumes the field will be 12 bytes long. Fixes COMPRESS-179.
Fix GNU Tar sometimes uses binary encoding for UID and GID. Fixes COMPRESS-175.
Fix ArchiveStreamFactory.createArchiveInputStream would claim short text files were TAR archives. Fixes COMPRESS-171.
Add Support for the XZ format has been added. Fixes COMPRESS-156.
Update BZip2CompressorInputStream now optionally supports reading of concatenated .bz2 files. Fixes COMPRESS-146.
Update GZipCompressorInputStream now optionally supports reading of concatenated .gz files. Fixes COMPRESS-154.
Fix ZipFile didn't work properly for archives using unicode extra fields rather than UTF-8 filenames and the EFS-Flag. Fixes COMPRESS-164.
Update The tar package can now read archives that use star/GNU/BSD extensions for files that are longer than 8 GByte as well as archives that use the POSIX/PAX variant. Fixes COMPRESS-16.
Update The tar package can now write archives that use star/GNU/BSD extensions for files that are longer than 8 GByte as well as archives that use the POSIX/PAX variant. Fixes COMPRESS-165.
Update The tar package can now use the POSIX/PAX variant for writing entries with names longer than 100 characters. Fixes COMPRESS-166.
Fix For corrupt archives ZipFile would throw a RuntimeException in some cases and an IOException in others. It will now consistently throw an IOException. Fixes COMPRESS-169.

Release 1.3 – 2011-11-01

Type Changes By
Add Support for the Pack200 format has been added. Fixes COMPRESS-142.
Add Read-only support for the format used by the Unix dump(8) tool has been added. Fixes COMPRESS-132.
Update The ZIP package now supports Zip64 extensions. Fixes COMPRESS-36.
Update The AR package now supports the BSD dialect of storing file names longer than 16 chars (both reading and writing). Fixes COMPRESS-144.
Fix BZip2CompressorInputStream's getBytesRead method always returned 0.
Fix ZipArchiveInputStream and ZipArchiveOutputStream could leak resources on some JDKs. Fixes COMPRESS-152.
Fix TarArchiveOutputStream's getBytesWritten method didn't count correctly. Fixes COMPRESS-160.

Release 1.2 – 2011-07-31

Type Changes By
Fix ZipArchiveInputStream could fail with a "Truncated ZIP" error message for entries between 2 GByte and 4 GByte in size. Fixes COMPRESS-129.
Fix TarArchiveInputStream now detects sparse entries using the oldgnu format and properly reports it cannot extract their contents. Fixes COMPRESS-145.
Add ZipArchiveEntry has a new method getRawName that provides the original bytes that made up the name. This may allow user code to detect the encoding. Fixes COMPRESS-123.
Fix The Javadoc for ZipArchiveInputStream#skip now matches the implementation, the code has been made more defensive. Fixes COMPRESS-130.
Fix ArArchiveInputStream fails if entries contain only blanks for userId or groupId. Fixes COMPRESS-140. Thanks to Trejkaz.
Fix ZipFile may leak resources on some JDKs. Fixes COMPRESS-139.
Update ZipFile now implements finalize which closes the underlying file.
Update Certain tar files not recognised by ArchiveStreamFactory. Fixes COMPRESS-117.
Fix BZip2CompressorInputStream throws IOException if underlying stream returns available() == 0. Removed the check. Fixes COMPRESS-125.
Fix Calling close() on inputStream returned by CompressorStreamFactory.createCompressorInputStream() does not close the underlying input stream. Fixes COMPRESS-127.
Add TarArchiveEntry provides access to the flags that determine whether it is an archived symbolic link, pipe or other "uncommon" file system object. Fixes COMPRESS-122.
Fix TarArchiveOutputStream#finish now writes all buffered data to the stream. Fixes COMPRESS-119.

Release 1.1 – 2010-08-13

Type Changes By
Fix Move acknowledgements from NOTICE to README. Fixes COMPRESS-72.
Fix TarArchiveEntry.parseTarHeader() includes the trailing space/NUL when parsing the octal size. Fixes COMPRESS-113.
Add Command-line interface to list archive contents. Usage: java -jar commons-compress-n.m.jar archive-name [zip|tar|etc]. Fixes COMPRESS-108.
Fix TarUtils.parseName does not properly handle characters outside the range 0-127. Fixes COMPRESS-118.
Update ArArchiveInputStream does not handle GNU extended filename records (//). Fixes COMPRESS-112.
Add Tar implementation does not support Pax headers Added support for reading pax headers. Note: does not support global pax headers. Fixes COMPRESS-109.
Fix ArchiveStreamFactory does not recognise tar files created by Ant. Fixes COMPRESS-107.
Fix Support "ustar" prefix field, which is used when file paths are longer than 100 characters. Fixes COMPRESS-110.
Update Document that the name of an ZipArchiveEntry determines whether an entry is considered a directory or not. If you don't use the constructor with the File argument the entry's name must end in a "/" in order for the entry to be known as a directory. Fixes COMPRESS-105.
Add ZipArchiveInputStream can optionally extract data that used the STORED compression method and a data descriptor. Doing so in a stream is not safe in general, so you have to explicitly enable the feature. By default the stream will throw an exception if it encounters such an entry. Fixes COMPRESS-103.
Fix ZipArchiveInputStream will throw an exception if it detects an entry that uses a data descriptor for a STORED entry since it cannot reliably find the end of data for this "compression" method. Fixes COMPRESS-100.
Fix ZipArchiveInputStream should now properly read archives that use data descriptors but without the "unofficial" signature. Fixes COMPRESS-101.
Add The ZIP classes will throw specialized exceptions if any attempt is made to read or write data that uses zip features not supported (yet). Fixes COMPRESS-98.
Add ZipFile#getEntries returns entries in a predictable order - the order they appear inside the central directory. A new method getEntriesInPhysicalOrder returns entries in order of the entry data, i.e. the order ZipArchiveInputStream would see. Fixes COMPRESS-99.
Add The Archive*Stream and ZipFile classes now have can(Read|Write)EntryData methods that can be used to check whether a given entry's data can be read/written. The method currently returns false for ZIP archives if an entry uses an unsupported compression method or encryption.
Add The ZIP classes now detect encrypted entries. Fixes COMPRESS-89.
Update Move DOS/Java time conversions into Zip utility class. Fixes COMPRESS-79.
Fix ZipArchiveInputStream failed to update the number of bytes read properly. Fixes COMPRESS-74.
Fix ArchiveInputStream has a new method getBytesRead that should be preferred over getCount since the later may truncate the number of bytes read for big archives.
Fix The cpio archives created by CpioArchiveOutputStream couldn't be read by many existing native implementations because the archives contained multiple entries with the same inode/device combinations and weren't padded to a blocksize of 512 bytes. Fixes COMPRESS-85.
Fix ZipArchiveEntry, ZipFile and ZipArchiveInputStream are now more lenient when parsing extra fields. Fixes COMPRESS-73.
Update ZipArchiveInputStream does not show location in file where a problem occurred. Fixes COMPRESS-75.
Fix cpio is terribly slow. Documented that buffered streams are needed for performance. Fixes COMPRESS-82.
Add Added autodetection of compression format to CompressorStreamFactory. Fixes COMPRESS-97.
Fix Improved exception message if the extra field data in ZIP archives cannot be parsed.
Fix Tar format unspecified - current support documented. Fixes COMPRESS-17.
Add Improve ExceptionMessages in ArchiveStreamFactory. Fixes COMPRESS-95. Thanks to Joerg Bellmann.
Fix ZipArchiveEntry's equals method was broken for entries created with the String-arg constructor. This lead to broken ZIP archives if two different entries had the same hash code. Fixes COMPRESS-94. Thanks to Anon Devs.
Fix ZipArchiveInputStream could repeatedly return 0 on read() when the archive was truncated. Fixes COMPRESS-87. Thanks to Antoni Mylka.
Fix Tar archive entries holding the file name for names longer than 100 characters in GNU longfile mode didn't properly specify they'd be using the "oldgnu" extension. Fixes COMPRESS-86.
Add A new constructor of TarArchiveEntry can create entries with names that start with slashes - the default is to strip leading slashes in order to create relative path names.
Fix Delegate all read and write methods in GZip stream in order to speed up operations. Fixes COMPRESS-83.
Add ArchiveEntry now has a getLastModifiedDate method.
Fix The ar and cpio streams now properly read and write last modified times.
Fix TarOutputStream can leave garbage at the end of the archive. Fixes COMPRESS-81.
Add Add a BZip2Utils class modelled after GZipUtils. Fixes COMPRESS-78. Thanks to Jukka Zitting.

Release 1.0 – 2009-05-21

Type Changes By
Add Initial release all
Fix Updating the pom.xml for preparing a move to commons-proper sgoeschl