2.1.3 - 2024-06-04
- Some date/time filters were previously unreliable (i.e. later-pass filters had no earliest-pass or latest-fail, and vice-versa)
- Decode Zip-Info UTF8 name and comment fields (#159)
- Return extended timestamp fields copied rather than borrowed (#183)
- Fix a new Clippy warning
- Fix a bug and inline
deserialize
for safety - Add check for wrong-length blocks, and incorporate fixed-size requirement into the trait name
- Fix a fuzz failure by using checked_sub
- Add feature gate for new unit test
2.1.1 - 2024-05-28
- Derive
Debug
forZipWriter
- lower default version to 4.5 and use the version-needed-to-extract where feasible.
- use a MIN_VERSION constant
- Bug fixes for debug implementation
- Bug fixes for debug implementation
- Update unit tests
- Remove unused import
2.1.0 - 2024-05-25
- Support mutual conversion between
DateTime
and MS-DOS pair
- version-needed-to-extract was incorrect in central header, and version-made-by could be lower than that (#100)
- version-needed-to-extract was incorrect in central header, and version-made-by could be lower than that (#100)
- Another tweak to ensure
version_needed
is applied - Tweaks to make
version_needed
andversion_made_by
work with recently-merged changes
2.0.0 - 2024-05-24
- Add
fmt::Display
forDateTime
- Implement more traits for
DateTime
- Change type of
last_modified_time
toOption<DateTime>
- [breaking] Rename
from_msdos
tofrom_msdos_unchecked
, make it unsafe, and addtry_from_msdos
(#145)
- Continue to accept archives with invalid DateTime, and use
now_utc()
as default only when writing, not reading
1.3.1 - 2024-05-21
- Make
deflate
enable both default implementations - Merge the hidden deflate-flate2 flag into the public one
- Rename _deflate-non-zopfli to _deflate-flate2
- Reject encrypted and using_data_descriptor files slightly faster in read_zipfile_from_stream
- Convert
impl TryInto<NaiveDateTime> for DateTime
toimpl TryFrom<DateTime> for NaiveDateTime
(#136)
- Change default compression implementation to
flate2/zlib-ng
1.3.0 - 2024-05-17
- Add
is_symlink
method
- Extract symlinks into symlinks on Unix and Windows, and fix a bug that affected making directories writable on MacOS
- Eliminate deprecation warning when
--all-features
implicitly enables the deprecated feature - Check if archive contains a symlink's target, without borrowing both at the same time
- Eliminate a clone that's no longer necessary
- is_dir only needs to look at the filename
- Remove unnecessary #[cfg] attributes
- Fix borrow-of-moved-value
- Box doesn't directly convert to PathBuf, so convert back to String first
- partial revert - only &str has chars(), but Box should auto-deref
- contains_key needs a
Box<str>
, so generifyis_dir
to accept one - Add missing
ZipFileData::is_dir()
method - Fix another Windows-specific error
- More bug fixes for Windows-specific symlink code
- More bug fixes for Windows-specific symlink code
- Bug fix: variable name change
- Bug fix: need both internal and output path to determine whether to symlink_dir
- Another bug fix
- Fix another error-type conversion error
- Fix error-type conversion on Windows
- Fix conditionally-unused import
- Fix continued issues, and factor out the Vec-to-OsString conversion (cc: #125)
- Fix CI failure involving conversion to OsString for symlinks (see my comments on #125)
- Move path join into platform-independent code
1.2.3 - 2024-05-10
- Remove a window when an extracted directory might be unexpectedly listable and/or
cd
able by non-owners - Extract directory contents on Unix even if the directory doesn't have write permission (https://github.com/zip-rs/zip-old/issues/423)
- More conditionally-unused imports
1.2.2 - 2024-05-09
- Failed to clear "writing_raw" before finishing a symlink, leading to dropped extra fields
- Use boxed slice for archive comment, since it can't be concatenated
- Optimize for the fact that false signatures can't overlap with real ones
1.2.1 - 2024-05-06
- Prevent panic when trying to read a file with an unsupported compression method
- Prevent panic after reading an invalid LZMA file
- Make
Stored
the default compression method ifDeflated
isn't available, so that zip files are readable by as much software as possible - version_needed was wrong when e.g. cfg(bzip2) but current file wasn't bzip2 (#100)
- file paths shouldn't start with slashes (#102)
- Overhaul
impl Arbitrary for FileOptions
- Remove unused
atomic
module
1.2.0 - 2024-05-06
- Add method
decompressed_size()
so non-recursive ZIP bombs can be detected
- Make
ZipWriter::finish()
consume theZipWriter
- Use panic! rather than abort to ensure the fuzz harness can process the failure
- Update fuzz_write to use replace_with
- Remove a drop that can no longer be explicit
- Add
#![allow(unexpected_cfgs)]
in nightly
1.1.4 - 2024-05-04
- Build was failing with bzip2 enabled
- use is_dir in more places where Windows paths might be handled incorrectly
- Quick filter for paths that contain "/../" or "/./" or start with "./" or "../"
- Fast handling for separator-free paths
- Speed up logic if main separator isn't '/'
- Drop
normalized_components
slightly sooner when not using it - Speed up
path_to_string
in cases where the path is already in the proper format
- Refactor: can short-circuit handling of paths that start with MAIN_SEPARATOR, no matter what MAIN_SEPARATOR is
- Bug fix: non-canonical path detection when MAIN_SEPARATOR is not slash or occurs twice in a row
- Bug fix: must recreate if . or .. is a path element
- Bug fix
- #58 (partial):
bzip2-rs
can't replacebzip2
because it's decompress-only
1.1.3 - 2024-04-30
- Rare bug where find_and_parse would give up prematurely on detecting a false end-of-CDR header
1.1.2 - 2024-04-28
- Alignment was previously handled incorrectly (#33)
- deprecate
deflate-miniz
feature since it's now equivalent todeflate
(#35)
index_for_name
,index_for_path
,name_for_index
: get the index of a file given its path or vice-versa, without initializing metadata from the local-file header or needing to mutably borrow theZipArchive
.add_symlink_from_path
,shallow_copy_file_from_path
,deep_copy_file_from_path
,raw_copy_file_to_path
: copy a file or create a symlink usingAsRef<Path>
arguments
add_directory_from_path
andstart_file_from_path
are no longer deprecated, and they now normalize..
as well as.
.
- 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.
- The published package on crates.io no longer includes the tests or examples.
- Now uses boxed slices rather than
String
orVec
for metadata fields that aren't likely to grow.
- 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.
- Updated dependencies.
- MSRV increased to
1.67
.
- Fixed some rare bugs that could cause panics when trying to read an invalid ZIP file or using an incorrect password.
- Where possible, methods are now
const
. This improves performance, especially when reading.
- Date and time conversion methods now return
DateTimeRangeError
rather than()
on error.
- 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.
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
- Zopfli for aggressive Deflate compression.
flush_on_finish_file
parameter forZipWriter
.
- 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()
.
- Fixed an issue where code might spuriously fail during write fuzzing.
- New method
with_alignment
onFileOptions
.
ZipWriter
now once again implementsSend
if the underlying writer does.
- 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.
- Fixed a bug that occurs when ZIP64 magic bytes occur twice in a filename or across two filenames.
- Added experimental [
zip::unstable::write::FileOptions::with_deprecated_encryption
] API to enable encrypting files with PKWARE encryption.
- Fixed a bug that occurs when a filename in a ZIP32 file includes the ZIP64 magic bytes.
- 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.
- Bumped the version number in order to upload an updated README to crates.io.
- 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.
- Fixed a possible bug in deep_copy_file.
- Fixed a Clippy warning that was missed during the last release.
- Fixed a bug that could cause later writes to fail after a
deep_copy_file
call.
- Updated dependency versions.
- Fixed an issue that prevented
ZipWriter
from implementingSend
.
- 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.
deep_copy_file
method: more standards-compliant way to copy a file from within the ZipWriter
- Unused flag
#![feature(read_buf)]
was breaking compatibility with stable compiler.
- Updated
aes
dependency to0.8.2
(zip-rs/zip-old#354) - Updated other dependency versions.
- Added experimental [
zip::unstable::write::FileOptions::with_deprecated_encryption
] API to enable encrypting files with PKWARE encryption.
shallow_copy_file
method: copy a file from within the ZipWriter
- #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