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.

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

The dependency on org.tukaani:xz is now marked as optional.

The snappy, ar and tar inputstreams might fail to read from a
non-buffered stream in certain cases. Fixes COMPRESS-270.

Release 1.8 - 2014-03-12

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.

CompressorStreamFactory.createCompressorInputStream with
explicit compression did not honor decompressConcatenated Fixes COMPRESS-259.

GzipCompressorInputStream now provides access to the same
metadata that can be provided via GzipParameters when writing
a gzip stream. Fixes COMPRESS-260.

TarArchiveInputStream will now read archives created by tar
implementations that encode big numbers by not adding a
trailing NUL. Fixes COMPRESS-262.

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.

When writing PAX/POSIX headers for TAR entries with
backslashes or certain non-ASCII characters in their name
TarArchiveOutputStream could fail. Fixes COMPRESS-265.

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.

ZipFile and ZipArchiveInputStream now support reading entries compressed using the
SHRINKING method. Thanks to Damjan Jovanovic.

TarArchiveInputStream could fail to read an archive completely. Fixes COMPRESS-245.

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.

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.

ZipFile and ZipArchiveInputStream now support reading entries compressed using the IMPLODE method. Fixes COMPRESS-115. Thanks to Emmanuel Bourg.

SevenZOutputFile would create invalid archives if more than
six empty files or directories were included. Fixes COMPRESS-252.

ZipFile and the 7z file classes now implement Closeable and
can be used in try-with-resources constructs.

Release 1.6 - 2013-10-26

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.

Added read-only support for ARJ archives that don't use
compression. Fixes COMPRESS-226. Thanks to Damjan Jovanovic.

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.

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.

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.

TarArchiveEntry now has a method to verify its checksum. Fixes COMPRESS-191. Thanks to Jukka Zitting.

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.

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.

Writing TAR PAX headers failed if the generated entry name
ended with a "/". Fixes COMPRESS-203.

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.

Split/spanned ZIP archives are now properly detected by
ArchiveStreamFactory but will cause an
UnsupportedZipFeatureException when read.

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.

TarArchiveEntry has a new constructor that allows setting
linkFlag and preserveLeadingSlashes at the same time. Fixes COMPRESS-201.

ChangeSetPerformer has a new perform overload that uses a
ZipFile instance as input. Fixes COMPRESS-159.

TarArchiveInputStream ignored the encoding for GNU long name
entries. Fixes COMPRESS-212.

CompressorStreamFactory can now be used without XZ for Java
being available. Fixes COMPRESS-221.

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

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

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.

Tar implementation does not support Pax headers
Added support for reading pax headers.
Note: does not support global pax headers Fixes COMPRESS-109.

ArchiveStreamFactory does not recognise tar files created by Ant Fixes COMPRESS-107.

Support "ustar" prefix field, which is used when file paths are longer
than 100 characters. Fixes COMPRESS-110.

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.

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.

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.

ZipArchiveInputStream should now properly read archives that
use data descriptors but without the "unofficial" signature. Fixes COMPRESS-101.

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.

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.

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.

ZipArchiveInputStream failed to update the number of bytes
read properly. Fixes COMPRESS-74.

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.

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.

ZipArchiveEntry, ZipFile and ZipArchiveInputStream are now
more lenient when parsing extra fields. Fixes COMPRESS-73.

ZipArchiveInputStream does not show location in file where a problem occurred. Fixes COMPRESS-75.

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.

ZipArchiveInputStream could repeatedly return 0 on read() when
the archive was truncated. Fixes COMPRESS-87. Thanks to Antoni Mylka.

Release 1.0 - 2009-05-21

Apache Commons, Apache Commons Compress, Apache, the Apache feather logo, and the Apache Commons project logos are trademarks of The Apache Software Foundation.
All other marks mentioned may be trademarks or registered trademarks of their respective owners.