forked from apache/commons-compress
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRELEASE-NOTES.txt
937 lines (848 loc) · 38.7 KB
/
RELEASE-NOTES.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
Apache Commons Compress RELEASE NOTES
Apache Commons Compress software defines an API for working with
compression and archive formats. These include: bzip2, gzip, pack200,
lzma, xz, Snappy, traditional Unix Compress, DEFLATE, LZ4, Brotli and ar, cpio,
jar, tar, zip, dump, 7z, arj.
Release 1.15
------------
New features:
o Added magic MANIFEST entry Automatic-Module-Name so the module
name will be org.apache.commons.compress when the jar is used
as an automatic module in Java9.
Issue: COMPRESS-397.
o Added a new utility class FixedLengthBlockOutputStream that
can be used to ensure writing always happens in blocks of a
given size.
Issue: COMPRESS-405. Thanks to Simon Spero.
o It is now possible to specify/read custom PAX headers when
writing/reading tar archives.
Issue: COMPRESS-400. Thanks to Simon Spero.
Fixed Bugs:
o Make sure "version needed to extract" in local file header and
central directory of a ZIP archive agree with each other.
Also ensure the version is set to 2.0 if DEFLATE is used.
Issue: COMPRESS-394.
o Don't use a data descriptor in ZIP archives when copying a raw
entry that already knows its size and CRC information.
Issue: COMPRESS-395.
o Travis build redundantly repeats compilation and tests redundantly
GitHub Pull Request #43. Thanks to Simon Spero.
Issue: COMPRESS-413
o The MANIFEST of 1.14 lacks an OSGi Import-Package for XZ for
Java.
Issue: COMPRESS-396.
o BUILDING.md now passes the RAT check.
Issue: COMPRESS-406. Thanks to Simon Spero.
o Made sure ChecksumCalculatingInputStream receives valid
checksum and input stream instances via the constructor.
Issue: COMPRESS-412. Thanks to Michael Hausegger.
o TarArchiveOutputStream now verifies the block and record sizes
specified at construction time are compatible with the tar
specification. In particular 512 is the only record size
accepted and the block size must be a multiple of 512.
Issue: COMPRESS-407. Thanks to Simon Spero.
o Fixed class names of CpioArchiveEntry and
CpioArchiveInputStream in various Javadocs.
Issue: COMPRESS-415.
o The code of the extended timestamp zip extra field incorrectly
assumed the time was stored as unsigned 32-bit int and thus
created incorrect results for years after 2037.
Issue: COMPRESS-416. Thanks to Simon Spero.
o Removed ZipEncoding code that became obsolete when we started
to require Java 5 as baseline long ago.
Issue: COMPRESS-410. Thanks to Simon Spero.
o The tar package will no longer try to parse the major and
minor device numbers unless the entry represents a character
or block special file.
Issue: COMPRESS-417.
o When reading tar headers with name fields containing embedded
NULs, the name will now be terminated at the first NUL byte.
Issue: COMPRESS-421. Thanks to Roel Spilker.
o Simplified TarArchiveOutputStream by replacing the internal
buffering with new class FixedLengthBlockOutputStream.
Issue: COMPRESS-409.
Release 1.14
------------
New features:
o Added write support for Snappy.
Issue: COMPRESS-246.
o Added support for LZ4 (block and frame format).
Issue: COMPRESS-271.
o Add static detect(InputStream in) to CompressorStreamFactory
and ArchiveStreamFactory
Issue: COMPRESS-385.
o Added a way to limit amount of memory ZCompressorStream may
use.
Issue: COMPRESS-382. Thanks to Tim Allison.
o Added a way to limit amount of memory ZCompressorStream may
use.
Issue: COMPRESS-386. Thanks to Tim Allison.
o Added a way to limit amount of memory LZMACompressorStream and
XZCompressorInputStream may use.
Issue: COMPRESS-382. Thanks to Tim Allison.
o Add Brotli decoder based on the Google Brotli library.
Issue: COMPRESS-392. Thanks to Philippe Mouawad.
o ZipEntry now exposes its data offset.
Issue: COMPRESS-390. Thanks to Zbynek Vyskovsky.
o 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.
Issue: COMPRESS-391. Thanks to Zbynek Vyskovsky.
Fixed Bugs:
o SnappyCompressorInputStream slides the window too early
leading to ArrayIndexOutOfBoundsExceptions for some streams.
Issue: COMPRESS-378.
o ZipArchiveEntry#isUnixSymlink now only returns true if the
corresponding link flag is the only file-type flag set.
Issue: COMPRESS-379. Thanks to Guillaume Boué.
o Fixed an integer overflow in CPIO's CRC calculation.
Pull Request #17. Thanks to Daniel Collin.
o Make unit tests work on Windows paths with spaces in their names.
Issue: COMPRESS-387.
o Internal location pointer in ZipFile could get incremented
even if nothing had been read.
Issue: COMPRESS-389.
o LZMACompressorOutputStream#flush would throw an exception
rather than be the NOP it promised to be.
Issue: COMPRESS-393.
Changes:
o The blocksize for FramedSnappyCompressorInputStream can now be
configured as some IWA files seem to be using blocks larger
than the default 32k.
Issue: COMPRESS-358.
o BZip2CompressorInputstream now uses BitInputStream internally.
Pull Request #13. Thanks to Thomas Meyer.
o Improved performance for concurrent reads from ZipFile when
reading from a file.
Issue: COMPRESS-388. Thanks to Zbynek Vyskovsky.
Release 1.13
------------
Commons Compress 1.13 is the first version to require Java 7 at
runtime.
Changes in this version include:
New features:
o SevenZFile, SevenZOutputFile, ZipFile and
ZipArchiveOutputStream can now work on non-file resources if
they can be accessed via SeekableByteChannel.
Issue: COMPRESS-327.
o Allow compressor extensions through a standard JRE ServiceLoader.
Issue: COMPRESS-368.
o Allow archive extensions through a standard JRE ServiceLoader.
Issue: COMPRESS-369.
o Add write support for the legacy LZMA format, this requires XZ
for Java 1.6.
Issue: COMPRESS-373.
o Add write support for the legacy LZMA stream to 7z, this
requires XZ for Java 1.6.
Issue: COMPRESS-374.
o Allow the clients of ParallelScatterZipCreator to provide
ZipArchiveEntryRequestSupplier.
Issue: COMPRESS-375. Thanks to Plamen Totev.
o Add a version-independent link to the API docs of the latest
release.
Issue: COMPRESS-372.
Fixed Bugs:
o BitInputStream could return bad results when overflowing
internally - if two consecutive reads tried to read more than
64 bits.
Issue: COMPRESS-363.
o ZipArchiveInputStream.closeEntry does not properly advance to
next entry if there are junk bytes at end of data section.
Issue: COMPRESS-364. Thanks to Mike Mole.
o ZipArchiveInputStream now throws an Exception if it encounters
a broken ZIP archive rather than signaling end-of-archive.
Issue: COMPRESS-367. Thanks to Mike Mole.
o ScatterZipOutputStream didn't close the StreamCompressor
causing a potential resource leak.
Issue: COMPRESS-377.
Changes:
o Update Java requirement from 6 to 7.
Issue: COMPRESS-360.
o Clarified which TarArchiveEntry methods are useless for
entries read from an archive.
Issue: COMPRESS-366.
Release 1.12
------------
Commons Compress 1.12 is the first version to require 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.
New features:
o FramedSnappyCompressorInputStream now supports the dialect of
Snappy used by the IWA files contained within the zip archives
used in Apple's iWork 13 files.
Issue: COMPRESS-352.
Fixed Bugs:
o SevenZFile.read() throws an IllegalStateException for empty entries.
Issue: COMPRESS-348.
o TarArchiveInputStream failed to parse PAX headers that included
blank lines.
Issue: COMPRESS-355. Thanks to Jeremy Gustie.
o TarArchiveInputStream failed to parse PAX headers whose tar entry
name ended with a slash.
Issue: COMPRESS-356. Thanks to Jeremy Gustie.
Changes:
o Update requirement from Java 5 to 6.
Issue: COMPRESS-349.
o TarArchiveEntry wastefully allocates empty arrays.
Issue: COMPRESS-350.
o Javadoc for BZip2CompressorInputStream(InputStream, boolean) should
refer to IOEx, not NPE.
Issue: COMPRESS-353.
o PureJavaCrc32C in the snappy package is now final so it is now safe
to call a virtual method inside the constructor.
Issue: COMPRESS-354.
o 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.
Issue: COMPRESS-351.
o BZip2CompressorOutputStream no longer tries to finish the output
stream in finalize. This is a breaking change for code that relied
on the finalizer.
Issue: COMPRESS-357.
Release 1.11
------------
New features:
o TarArchiveInputStream now supports reading global PAX headers.
Issue: COMPRESS-347.
o The PAX headers for sparse entries written by star are now
applied.
Issue: COMPRESS-346.
o GNU sparse files using one of the PAX formats are now
detected, but cannot be extracted.
Issue: COMPRESS-345.
o New method SevenZFile.getEntries can be used to list the
contents of a 7z archive.
Issue: COMPRESS-341.
o When using Zip64Mode.Always also use ZIP64 extensions inside
the central directory.
GitHub Pull Request #10 Thanks to Matt Hovey.
o ZipFile.getRawInputStream() is now part of the public API
Issue: COMPRESS-323.
o Allow byte-for-byte replication of Zip entries.
GitHub Pull Request #6. Thanks to Jason van Zyl.
o TarArchiveEntry's preserveLeadingSlashes is now a property and used
on later calls to setName, too.
This behavior is a breaking change.
Issue: COMPRESS-328.
o Added read-only support for bzip2 compression used inside of
ZIP archives.
GitHub Pull Request #4. Thanks to Sören Glimm.
Fixed Bugs:
o ArArchiveInputStream can now read GNU extended names that are
terminated with a NUL byte rather than a linefeed.
Issue: COMPRESS-344.
o Native Memory Leak in Sevenz-DeflateDecoder.
Issue: COMPRESS-343. Thanks to Rene Preissel.
o 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.
Issue: COMPRESS-340. Thanks to Dawid Weiss.
o file names of tar archives using the xstar format are now
parsed properly.
Issue: COMPRESS-336.
o checksums of tars that pad the checksum field to the left are
now calculated properly.
Issue: COMPRESS-335.
o ArArchiveInputStream failed to read past the first entry when
BSD long names have been used.
Issue: COMPRESS-334. Thanks to Jeremy Gustie.
o Added buffering for random access which speeds up 7Z support.
Issue: COMPRESS-333. Thanks to Dawid Weiss.
o 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.
Issue: COMPRESS-331.
o SnappyCompressorInputStream and
FramedSnappyCompressorInputStream returned 0 at the end of the
stream under certain circumstances.
Issue: COMPRESS-332.
o Adjusted unit test to updates in Java8 and later that change
the logic of ZipEntry#getTime.
Issue: COMPRESS-326.
o 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.
Issue: COMPRESS-324.
o ArrayIndexOutOfBoundsException when InfoZIP type 7875 extra
fields are read from the central directory.
Issue: COMPRESS-321.
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 which makes
this class binary incompatible with the one of Compress 1.9. Code
that extends ZCompressorInputStream will need to be recompiled in
order to work with Compress 1.10.
New features:
o CompressorStreamFactory can now auto-detect DEFLATE streams
with ZLIB header.
Issue: COMPRESS-316. Thanks to Nick Burch.
o CompressorStreamFactory can now auto-detect LZMA streams.
Issue: COMPRESS-313.
o 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.
Issue: COMPRESS-296. Thanks to Kristian Rosenvold.
o 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.
o New methods in ZipArchiveOutputStream and ZipFile allows
entries to be copied from one archive to another without
having to re-compress them.
Issue: COMPRESS-295. Thanks to Kristian Rosenvold.
Fixed Bugs:
o TarArchiveInputStream can now read entries with group or
user ids > 0x80000000.
Issue: COMPRESS-314.
o TarArchiveOutputStream can now write entries with group or
user ids > 0x80000000.
Issue: COMPRESS-315.
o TarArchiveEntry's constructor with a File and a String arg
didn't normalize the name.
Issue: COMPRESS-312.
o ZipEncodingHelper no longer reads system properties directly
to determine the default charset.
Issue: COMPRESS-308.
o BZip2CompressorInputStream#read would return -1 when asked to
read 0 bytes.
Issue: COMPRESS-309.
o ArchiveStreamFactory fails to pass on the encoding when creating
some streams.
* ArjArchiveInputStream
* CpioArchiveInputStream
* DumpArchiveInputStream
* JarArchiveInputStream
* TarArchiveInputStream
* JarArchiveOutputStream
Issue: COMPRESS-306.
o Restore immutability/thread-safety to ArchiveStreamFactory.
The class is now immutable provided that the method setEntryEncoding
is not used. The class is thread-safe.
Issue: COMPRESS-302.
o Restore immutability/thread-safety to CompressorStreamFactory.
The class is now immutable provided that the method
setDecompressConcatenated is not used. The class is thread-safe.
Issue: COMPRESS-303.
o 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.
Issue: COMPRESS-297.
o Improved error message when tar encounters a groupId that is
too big to write without using the STAR or POSIX format.
Issue: COMPRESS-290. Thanks to Kristian Rosenvold.
o SevenZFile now throws the specific PasswordRequiredException
when it encounters an encrypted stream but no password has
been specified.
Issue: COMPRESS-298.
Changes:
o 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.
For complete information on Apache Commons Compress, including instructions
on how to submit bug reports, patches, or suggestions for improvement,
see the Apache Commons Compress website:
http://commons.apache.org/compress/
Old Release Notes
=================
Release 1.9
-----------
New features:
o Added support for DEFLATE streams without any gzip framing.
Issue: COMPRESS-263.
Thanks to Matthias Stevens.
Fixed Bugs:
o When reading 7z files unknown file properties and properties of type
kDummy are now ignored.
Issue: COMPRESS-287.
o Expanding 7z archives using LZMA compression could cause an
EOFException.
Issue: COMPRESS-286.
o 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.
Issue: COMPRESS-289.
Thanks to Bob Robertson.
Changes:
o 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.
Issue: COMPRESS-285.
Release 1.8.1
-------------
New features:
o COMPRESS-272: CompressorStreamFactory can now auto-detect Unix compress
(".Z") streams.
Fixed Bugs:
o COMPRESS-270: The snappy, ar and tar inputstreams might fail to read from a
non-buffered stream in certain cases.
o COMPRESS-277: IOUtils#skip might skip fewer bytes than requested even though
more could be read from the stream.
o COMPRESS-276: ArchiveStreams now validate there is a current entry before
reading or writing entry data.
o ArjArchiveInputStream#canReadEntryData tested the current
entry of the stream rather than its argument.
o COMPRESS-274: ChangeSet#delete and deleteDir now properly deal with unnamed
entries.
o COMPRESS-273: Added a few null checks to improve robustness.
o COMPRESS-278: TarArchiveInputStream failed to read archives with empty
gid/uid fields.
o COMPRESS-279: TarArchiveInputStream now again throws an exception when it
encounters a truncated archive while reading from the last
entry.
o COMPRESS-280: Adapted TarArchiveInputStream#skip to the modified
IOUtils#skip method. Thanks to BELUGA BEHR.
Changes:
o The dependency on org.tukaani:xz is now marked as optional.
Release 1.8
-----------
New features:
o GzipCompressorInputStream now provides access to the same
metadata that can be provided via GzipParameters when writing
a gzip stream.
Issue: COMPRESS-260.
o SevenZOutputFile now supports chaining multiple
compression/encryption/filter methods and passing options to
the methods.
Issue: COMPRESS-266.
o The (compression) method(s) can now be specified per entry in
SevenZOutputFile.
Issue: COMPRESS-261.
o SevenZArchiveEntry "knows" which method(s) have been used to
write it to the archive.
Issue: COMPRESS-258.
o The 7z package now supports the delta filter as method.
o 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.
Issue: COMPRESS-257.
Fixed Bugs:
o BZip2CompressorInputStream read fewer bytes than possible from
a truncated stream.
Issue: COMPRESS-253.
o SevenZFile failed claiming the dictionary was too large when
archives used LZMA compression for headers and content and
certain non-default dictionary sizes.
Issue: COMPRESS-253.
o CompressorStreamFactory.createCompressorInputStream with
explicit compression did not honor decompressConcatenated
Issue: COMPRESS-259.
o TarArchiveInputStream will now read archives created by tar
implementations that encode big numbers by not adding a
trailing NUL.
Issue: COMPRESS-262.
o ZipArchiveInputStream would return NUL bytes for the first 512
bytes of a STORED entry if it was the very first entry of the
archive.
Issue: COMPRESS-264.
o When writing PAX/POSIX headers for TAR entries with
backslashes or certain non-ASCII characters in their name
TarArchiveOutputStream could fail.
Issue: COMPRESS-265.
o 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.
Issue: COMPRESS-267.
Release 1.7
-----------
New features:
o Read-Only support for Snappy compression.
Issue: COMPRESS-147. Thanks to BELUGA BEHR.
o Read-Only support for .Z compressed files.
Issue: COMPRESS-243. Thanks to Damjan Jovanovic.
o ZipFile and ZipArchiveInputStream now support reading entries
compressed using the SHRINKING method. Thanks to Damjan Jovanovic.
o GzipCompressorOutputStream now supports setting the compression
level and the header metadata (filename, comment, modification time,
operating system and extra flags)
Issue: COMPRESS-250. Thanks to Emmanuel Bourg.
o ZipFile and ZipArchiveInputStream now support reading entries
compressed using the IMPLODE method.
Issue: COMPRESS-115. Thanks to Emmanuel Bourg.
o ZipFile and the 7z file classes now implement Closeable and can be
used in try-with-resources constructs.
Fixed Bugs:
o SevenZOutputFile#closeArchiveEntry throws an exception when using
LZMA2 compression on Java8. Issue: COMPRESS-241.
o 7z reading of big 64bit values could be wrong.
Issue: COMPRESS-244. Thanks to Nico Kruber.
o TarArchiveInputStream could fail to read an archive completely.
Issue: COMPRESS-245.
o 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.
Issue: COMPRESS-242.
o SevenZOutputFile would create invalid archives if more than six
empty files or directories were included. Issue: COMPRESS-252.
Release 1.6
-----------
Version 1.6 introduces changes to the internal API of the tar package that
break backwards compatibility in the following rare cases. This version
removes the package private TarBuffer class along with the protected "buffer"
members in TarArchiveInputStream and TarArchiveOutputStream. This change will
only affect you if you have created a subclass of one of the stream classes
and accessed the buffer member or directly used the TarBuffer class.
Changes in this version include:
New features:
o Added support for 7z archives. Most compression algorithms
can be read and written, LZMA and encryption are only
supported when reading. Issue: COMPRESS-54. Thanks to Damjan Jovanovic.
o Added read-only support for ARJ archives that don't use
compression. Issue: COMPRESS-226. Thanks to Damjan Jovanovic.
o DumpArchiveInputStream now supports an encoding parameter that
can be used to specify the encoding of file names.
o The CPIO streams now support an encoding parameter that can be
used to specify the encoding of file names.
o Read-only support for LZMA standalone compression has been added.
Issue: COMPRESS-111.
Fixed Bugs:
o TarBuffer.tryToConsumeSecondEOFRecord could throw a
NullPointerException Issue: COMPRESS-223. Thanks to Jeremy Gustie.
o 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. Issue: COMPRESS-228.
o TAR will now properly read the names of symbolic links with
long names that use the GNU variant to specify the long file
name. Issue: COMPRESS-229. Thanks to Christoph Gysin.
o 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.
Issue: COMPRESS-227.
o CpioArchiveInputStream failed to read archives created by
Redline RPM. Issue: COMPRESS-236. Thanks to Andrew Duffy.
o TarArchiveOutputStream now properly handles link names that
are too long to fit into a traditional TAR header. Issue:
COMPRESS-237. Thanks to Emmanuel Bourg.
o The auto-detecting create*InputStream methods of Archive and
CompressorStreamFactory could fail to detect the format of
blocking input streams. Issue: COMPRESS-239.
Changes:
o Readabilty patch to TarArchiveInputStream. Issue:
COMPRESS-232. Thanks to BELUGA BEHR.
o Performance improvements to TarArchiveInputStream, in
particular to the skip method. Issue: COMPRESS-234. Thanks to
BELUGA BEHR.
Release 1.5
-----------
New features:
o CompressorStreamFactory has an option to create decompressing
streams that decompress the full input for formats that support
multiple concatenated streams.
Issue: COMPRESS-220.
Fixed Bugs:
o Typo in CompressorStreamFactory Javadoc
Issue: COMPRESS-218.
Thanks to Gili.
o ArchiveStreamFactory's tar stream detection created false positives
for AIFF files.
Issue: COMPRESS-191.
Thanks to Jukka Zitting.
o 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.
Issue: COMPRESS-199.
Thanks to Jukka Zitting.
o 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.
Issue: COMPRESS-200.
Thanks to Christian Schlichtherle.
o Writing TAR PAX headers failed if the generated entry name ended
with a "/".
Issue: COMPRESS-203.
o ZipArchiveInputStream sometimes failed to provide input to the
Inflater when it needed it, leading to reads returning 0.
Issue: COMPRESS-189.
Thanks to Daniel Lowe.
o TarArchiveInputStream ignored the encoding for GNU long name
entries.
Issue: COMPRESS-212.
o TarArchiveInputStream could leave the second EOF record inside the
stream it had just finished reading.
Issue: COMPRESS-206.
Thanks to Peter De Maeyer.
o DumpArchiveInputStream no longer implicitly closes the original
input stream when it reaches the end of the archive.
o ZipArchiveInputStream now consumes the remainder of the archive when
getNextZipEntry returns null.
o Unit tests could fail if the source tree was checked out to a
directory tree containign spaces.
Issue: COMPRESS-205.
Thanks to Daniel Lowe.
o Fixed a potential ArrayIndexOutOfBoundsException when reading STORED
entries from ZipArchiveInputStream.
Issue: COMPRESS-219.
o CompressorStreamFactory can now be used without XZ for Java being
available.
Issue: COMPRESS-221.
Changes:
o Improved exception message if a zip archive cannot be read because
of an unsupported compression method.
Issue: COMPRESS-188.
Thanks to Harald Kuhn.
o ArchiveStreamFactory has a setting for file name encoding that sets
up encoding for ZIP and TAR streams.
Issue: COMPRESS-192.
Thanks to Jukka Zitting.
o TarArchiveEntry now has a method to verify its checksum.
Issue: COMPRESS-191.
Thanks to Jukka Zitting.
o Split/spanned ZIP archives are now properly detected by
ArchiveStreamFactory but will cause an
UnsupportedZipFeatureException when read.
o 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.
Issue: COMPRESS-208.
o TarArchiveEntry has a new constructor that allows setting linkFlag
and preserveLeadingSlashes at the same time.
Issue: COMPRESS-201.
o ChangeSetPerformer has a new perform overload that uses a ZipFile
instance as input.
Issue: COMPRESS-159.
o Garbage collection pressure has been reduced by reusing temporary
byte arrays in classes.
Issue: COMPRESS-172.
Thanks to Thomas Mair.
o Can now handle zip extra field 0x5455 - Extended Timestamp.
Issue: COMPRESS-210.
Thanks to Julius Davies.
o handle zip extra field 0x7875 - Info Zip New Unix Extra Field.
Issue: COMPRESS-211.
Thanks to Julius Davies.
o ZipShort, ZipLong, ZipEightByteInteger should implement Serializable
Issue: COMPRESS-213.
Thanks to Julius Davies.
o better support for unix symlinks in ZipFile entries.
Issue: COMPRESS-214.
Thanks to Julius Davies.
o ZipFile's initialization has been improved for non-Zip64 archives.
Issue: COMPRESS-215.
Thanks to Robin Power.
o Updated XZ for Java dependency to 1.2 as this version provides
proper OSGi manifest attributes.
Release 1.4.1
-------------
This is a security bugfix release, see
http://commons.apache.org/proper/commons-compress/security.html#Fixed_in_Apache_Commons_Compress_1.4.1
Fixed Bugs:
o Ported libbzip2's fallback sort algorithm to
BZip2CompressorOutputStream to speed up compression in certain
edge cases.
Release 1.4
-----------
New features:
o COMPRESS-156: Support for the XZ format has been added.
Fixed Bugs:
o COMPRESS-183: 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.
o COMPRESS-184: TarArchiveInputStream failed to parse PAX headers that
contained non-ASCII characters.
o COMPRESS-178: TarArchiveInputStream throws IllegalArgumentException instead of IOException
o COMPRESS-179: TarUtils.formatLongOctalOrBinaryBytes() assumes the field will be 12 bytes long
o COMPRESS-175: GNU Tar sometimes uses binary encoding for UID and GID
o COMPRESS-171: ArchiveStreamFactory.createArchiveInputStream would claim
short text files were TAR archives.
o COMPRESS-164: ZipFile didn't work properly for archives using unicode extra
fields rather than UTF-8 filenames and the EFS-Flag.
o COMPRESS-169: For corrupt archives ZipFile would throw a RuntimeException in
some cases and an IOException in others. It will now
consistently throw an IOException.
Changes:
o COMPRESS-182: 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.
o COMPRESS-181: Added a workaround for a Bug some tar implementations that add
a NUL byte as first byte in numeric header fields.
o COMPRESS-176: Added a workaround for a Bug in WinZIP which uses backslashes
as path separators in Unicode Extra Fields.
o COMPRESS-131: ArrayOutOfBounds while decompressing bz2. Added test case - code already seems to have been fixed.
o COMPRESS-146: BZip2CompressorInputStream now optionally supports reading of
concatenated .bz2 files.
o COMPRESS-154: GZipCompressorInputStream now optionally supports reading of
concatenated .gz files.
o COMPRESS-16: 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.
o COMPRESS-165: 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.
o COMPRESS-166: The tar package can now use the POSIX/PAX variant for writing
entries with names longer than 100 characters.
Release 1.3
-----------
Commons Compress 1.3 is the first version to require Java5 at runtime.
Changes in this version include:
New features:
o Support for the Pack200 format has been added. Issue: COMPRESS-142.
o Read-only support for the format used by the Unix dump(8) tool
has been added. Issue: COMPRESS-132.
Fixed Bugs:
o BZip2CompressorInputStream's getBytesRead method always
returned 0.
o ZipArchiveInputStream and ZipArchiveOutputStream could leak
resources on some JDKs. Issue: COMPRESS-152.
o TarArchiveOutputStream's getBytesWritten method didn't count
correctly. Issue: COMPRESS-160.
Changes:
o The ZIP package now supports Zip64 extensions. Issue: COMPRESS-36.
o The AR package now supports the BSD dialect of storing file
names longer than 16 chars (both reading and writing).
Issue: COMPRESS-144.
Release 1.2
-----------
New features:
o COMPRESS-123: 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.
o COMPRESS-122: TarArchiveEntry provides access to the flags that determine
whether it is an archived symbolic link, pipe or other
"uncommon" file system object.
Fixed Bugs:
o COMPRESS-129: ZipArchiveInputStream could fail with a "Truncated ZIP" error
message for entries between 2 GByte and 4 GByte in size.
o COMPRESS-145: TarArchiveInputStream now detects sparse entries using the
oldgnu format and properly reports it cannot extract their
contents.
o COMPRESS-130: The Javadoc for ZipArchiveInputStream#skip now matches the
implementation, the code has been made more defensive.
o COMPRESS-140: ArArchiveInputStream fails if entries contain only blanks for
userId or groupId. Thanks to Trejkaz.
o COMPRESS-139: ZipFile may leak resources on some JDKs.
o COMPRESS-125: BZip2CompressorInputStream throws IOException if
underlying stream returns available() == 0.
Removed the check.
o COMPRESS-127: Calling close() on inputStream returned by
CompressorStreamFactory.createCompressorInputStream()
does not close the underlying input stream.
o COMPRESS-119: TarArchiveOutputStream#finish now writes all buffered
data to the stream
Changes:
o ZipFile now implements finalize which closes the underlying
file.
o COMPRESS-117: Certain tar files not recognised by
ArchiveStreamFactory.
Release 1.1
-----------
New features:
o COMPRESS-108: Command-line interface to list archive contents.
Usage: java -jar commons-compress-n.m.jar archive-name [zip|tar|etc]
o COMPRESS-109: Tar implementation does not support Pax headers
Added support for reading pax headers.
Note: does not support global pax headers
o COMPRESS-103: 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.
o COMPRESS-98: The ZIP classes will throw specialized exceptions if any
attempt is made to read or write data that uses zip features
not supported (yet).
o COMPRESS-99: 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.
o 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.
o COMPRESS-89: The ZIP classes now detect encrypted entries.
o COMPRESS-97: Added autodetection of compression format to
CompressorStreamFactory.
o COMPRESS-95: Improve ExceptionMessages in ArchiveStreamFactory Thanks to Joerg Bellmann.
o 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.
o ArchiveEntry now has a getLastModifiedDate method.
o COMPRESS-78: Add a BZip2Utils class modelled after GZipUtils Thanks to Jukka Zitting.
Fixed Bugs:
o COMPRESS-72: Move acknowledgements from NOTICE to README
o COMPRESS-113: TarArchiveEntry.parseTarHeader() includes the trailing space/NUL when parsing the octal size
o COMPRESS-118: TarUtils.parseName does not properly handle characters outside the range 0-127
o COMPRESS-107: ArchiveStreamFactory does not recognise tar files created by Ant
o COMPRESS-110: Support "ustar" prefix field, which is used when file paths are longer
than 100 characters.
o COMPRESS-100: 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.
o COMPRESS-101: ZipArchiveInputStream should now properly read archives that
use data descriptors but without the "unofficial" signature.
o COMPRESS-74: ZipArchiveInputStream failed to update the number of bytes
read properly.
o 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.
o COMPRESS-85: 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.
o COMPRESS-73: ZipArchiveEntry, ZipFile and ZipArchiveInputStream are now
more lenient when parsing extra fields.
o COMPRESS-82: cpio is terribly slow.
Documented that buffered streams are needed for performance
o Improved exception message if the extra field data in ZIP
archives cannot be parsed.
o COMPRESS-17: Tar format unspecified - current support documented.
o COMPRESS-94: 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. Thanks to Anon Devs.
o COMPRESS-87: ZipArchiveInputStream could repeatedly return 0 on read() when
the archive was truncated. Thanks to Antoni Mylka.
o COMPRESS-86: 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.
o COMPRESS-83: Delegate all read and write methods in GZip stream in order to
speed up operations.
o The ar and cpio streams now properly read and write last
modified times.
o COMPRESS-81: TarOutputStream can leave garbage at the end of the archive
Changes:
o COMPRESS-112: ArArchiveInputStream does not handle GNU extended filename records (//)
o COMPRESS-105: 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.
o COMPRESS-79: Move DOS/Java time conversions into Zip utility class.
o COMPRESS-75: ZipArchiveInputStream does not show location in file
where a problem occurred.