- #333: disabled the default features of the
time
dependency, and alsoformatting
andmacros
, as they were enabled by mistake. - Deprecated
DateTime::from_time
in favor ofDateTime::try_from
shallow_copy_file
method: copy a file from within the ZipWriter
- Unused flag
#![feature(read_buf)]
was breaking compatibility with stable compiler.
- Updated dependency versions.
deep_copy_file
method: more standards-compliant way to copy a file from within the ZipWriter
- Detects duplicate filenames.
deep_copy_file
could set incorrect Unix permissions.deep_copy_file
could handle files incorrectly if their compressed size was u32::MAX bytes or less but their uncompressed size was not.- Documented that
deep_copy_file
does not copy a directory's contents.
- Improved performance of
deep_copy_file
by using a HashMap and eliminating a redundant search.
- Fixed an issue that prevented
ZipWriter
from implementingSend
.
- Updated dependency versions.
- Fixed a bug that could cause later writes to fail after a
deep_copy_file
call.
- Fixed a Clippy warning that was missed during the last release.
- Fixed a possible bug in deep_copy_file.
- Calling
start_file
with invalid parameters no longer closes theZipWriter
. - Attempting to write a 4GiB file without calling
FileOptions::large_file(true)
now removes the file from the archive but does not close theZipWriter
. - Attempting to write a file with an unrepresentable or invalid last-modified date will instead add it with a date of 1980-01-01 00:00:00.
- Method
is_writing_file
- indicates whether a file is open for writing.
- Bumped the version number in order to upload an updated README to crates.io.
- Method
abort_file
- removes the current or most recently-finished file from the archive.
- Fixed a bug where a file could remain open for writing after validations failed.
- Fixed a bug that occurs when a filename in a ZIP32 file includes the ZIP64 magic bytes.
- Added experimental [
zip::unstable::write::FileOptions::with_deprecated_encryption
] API to enable encrypting files with PKWARE encryption.
- Fixed a bug that occurs when ZIP64 magic bytes occur twice in a filename or across two filenames.
- Methods
start_file_aligned
,start_file_with_extra_data
,end_local_start_central_extra_data
andend_extra_data
(see below).
- Alignment and extra-data fields are now attributes of [
zip::unstable::write::FileOptions
], allowing them to be specified foradd_directory
andadd_symlink
. - Extra-data fields are now formatted by the
FileOptions
methodadd_extra_data
. - Improved performance, especially for
shallow_copy_file
anddeep_copy_file
on files with extra data.
- Fixes a rare bug where the size of the extra-data field could overflow when
large_file
was set. - Fixes more cases of a bug when ZIP64 magic bytes occur in filenames.
ZipWriter
now once again implementsSend
if the underlying writer does.
- Fixed an issue where code might spuriously fail during write fuzzing.
- New method
with_alignment
onFileOptions
.
- Uses the
aes::cipher::KeyInit
trait fromaes
0.8.2 where appropriate.
- Calling
abort_file()
no longer corrupts the archive if called on a shallow copy of a remaining file, or on an archive whose CDR entries are out of sequence. However, it may leave an unused entry in the archive. - Calling
abort_file()
while writing a ZipCrypto-encrypted file no longer causes a crash. - Calling
abort_file()
on the last file beforefinish()
no longer produces an invalid ZIP file or garbage in the comment.
ZipWriter
methodsget_comment()
andget_raw_comment()
.
flush_on_finish_file
parameter forZipWriter
.
- Zopfli for aggressive Deflate compression.
zlib-ng
for fast Deflate compression. This is now the default for compression levels 0-9.chrono
to convert zip::DateTime to and from chrono::NaiveDateTime
- Replaces the
flush_on_finish_file
parameter ofZipWriter::new
andZipWriter::Append
with aset_flush_on_finish_file
method.
- Fixes build errors that occur when all default features are disabled.
- Fixes more cases of a bug when ZIP64 magic bytes occur in filenames.
- Date and time conversion methods now return
DateTimeRangeError
rather than()
on error.
- Where possible, methods are now
const
. This improves performance, especially when reading.
- Updated dependencies.
- MSRV increased to
1.67
.
- Support for
DEFLATE64
(decompression only). - Support for Zopfli compression levels up to
i64::MAX
.
InvalidPassword
is now a kind ofZipError
to eliminate the need for nestedResult
structs.- Updated dependencies.
- Fixed some rare bugs that could cause panics when trying to read an invalid ZIP file or using an incorrect password.
- Now uses boxed slices rather than
String
orVec
for metadata fields that aren't likely to grow.
- The published package on crates.io no longer includes the tests or examples.
- Support for decoding LZMA.
- Eliminated a custom
AtomicU64
type by replacing it withOnceLock
in the only place it's used. FileOptions
now has the subtypeSimpleFileOptions
which implementsCopy
but has no extra data.