Chris Hennick
b051ca3d47
chore: Fix a bug introduced by c934c824
2024-06-22 16:57:49 -07:00
Chris Hennick
fcc4fa93e3
style: Fix a Clippy warning re unnecessary into_iter()
2024-06-21 23:15:23 -07:00
Chris Hennick
e20fd7959a
style: cargo fmt --all
2024-06-21 20:28:43 -07:00
Chris Hennick
c934c82405
fix: Some archives with over u16::MAX files were handled incorrectly or slowly ( #189 )
2024-06-21 20:22:15 -07:00
Chris Hennick
26e6462a8d
style: cargo fmt --all
2024-06-21 10:34:03 -07:00
Chris Hennick
27c7fa4cd4
chore: Fix a failing unit test
2024-06-20 13:40:12 -07:00
Chris Hennick
f1b617d112
fix: Check number of files when deciding whether a CDE is the real one
2024-06-20 04:45:43 -07:00
Chris Hennick
78a38e977a
fix: Could still select a fake CDE over a real one in some cases
2024-06-18 22:33:24 -07:00
Chris Hennick
a895aa57b1
style: cargo fmt --all
2024-06-18 20:11:56 -07:00
Chris Hennick
d309f07010
chore: Fix build errors on older Rust versions
2024-06-18 20:09:50 -07:00
Chris Hennick
9bf914d7d4
fix: May have to consider multiple CDEs before filtering for validity
2024-06-18 19:58:16 -07:00
Chris Hennick
45472486f1
style: Fix a Clippy warning
2024-06-18 12:41:16 -07:00
Chris Hennick
19118f45f3
chore: Fix build
2024-06-18 10:41:35 -07:00
Chris Hennick
cb2d7abde7
fix: We now keep searching for a real CDE header after read an invalid one from the file comment
2024-06-18 10:31:25 -07:00
Chris Hennick
9568e713bd
style: cargo fmt --all
2024-06-17 18:54:06 -07:00
Chris Hennick
4065f0501f
fix: Always search for data start when opening an archive for append, and reject the header if data appears to start after central directory
2024-06-17 17:44:34 -07:00
Chris Hennick
052f3a133e
fix: ZIP64 header was being written twice when copying a file
2024-06-14 17:09:36 -07:00
Chris Hennick
a770913f7b
fix: ZIP64 header was being written to central header twice
2024-06-14 16:38:11 -07:00
Chris Hennick
fdb79845be
perf: Only build one IndexMap after choosing among the possible valid headers
2024-06-14 15:03:56 -07:00
Chris Hennick
c4bd7a61a5
test: Fix a bug involving ZIP64 field parsing
2024-06-14 13:25:49 -07:00
Chris Hennick
499bd65f71
test: Fix bugs involving AES encryption
2024-06-14 11:45:37 -07:00
Chris Hennick
ede85c0f9e
test: Fix bug: wrong field was being used for CRC32
2024-06-14 10:01:50 -07:00
Chris Hennick
16f619d9f2
chore: Partial debug
2024-06-13 23:44:37 -07:00
Chris Hennick
6b93d358d5
chore: Fix more errors when parsing multiple extra fields
2024-06-13 23:11:32 -07:00
Chris Hennick
290fd97013
chore: Fix an error when decoding AES header
2024-06-13 23:01:46 -07:00
Chris Hennick
88b4ae30b4
fix: Fix bugs involving alignment padding and Unicode extra fields
2024-06-13 20:52:45 -07:00
Chris Hennick
0bd2fe11d7
fix: Parse the extra field and reject it if invalid
2024-06-13 17:48:54 -07:00
Chris Hennick
14c590740e
style: Remove unneeded mut
2024-06-13 14:52:46 -07:00
Chris Hennick
3eb2a0464b
perf: Skip searching for the ZIP32 header if a valid ZIP64 header is present ( #189 )
2024-06-13 14:18:36 -07:00
Chris Hennick
77e718864d
fix: Incorrect behavior following a rare combination of merge_archive
, abort_file
and deep_copy_file
. As well, we now return an error when a file is being copied to itself.
2024-06-13 13:49:27 -07:00
Chris Hennick
73396be9f9
chore: Fix: may need the absolute start as tiebreaker to ensure deterministic behavior
2024-06-08 15:13:09 -07:00
Chris Hennick
894e0ad44c
fix: Fix an issue where the central directory could be incorrectly detected
2024-06-08 15:10:08 -07:00
Chris Hennick
fce5e0a2d3
test: Add regression tests for #159
2024-06-04 09:29:33 -07:00
Chris Hennick
97245ad68d
chore: Fix a new Clippy warning
2024-06-02 22:04:40 -07:00
Chris Hennick
eacc320fe0
chore: Add check for wrong-length blocks, and incorporate fixed-size requirement into the trait name
2024-06-02 21:48:21 -07:00
Chris Hennick
fb781e0517
chore: Add feature gate for new unit test
2024-06-02 18:53:27 -07:00
Chris Hennick
c8d1cb905f
Merge branch 'master' into utf8_extra_fields
2024-06-02 17:52:04 -07:00
Chris Hennick
847e537e86
test: Add unit test for UTF8 extra-field handling
2024-06-02 17:46:55 -07:00
Chris Hennick
2a131e67a9
fix: Use deflate-flate2 flag to guard import
2024-06-02 17:29:49 -07:00
Chris Hennick
7530ce5000
style: Cargo fmt --all
2024-06-02 11:56:46 -07:00
Chris Hennick
e3c81023a7
fix: Decode Zip-Info UTF8 name and comment fields ( #159 )
2024-06-02 11:52:20 -07:00
Alex Franchuk
a8875b0226
feat: Allow the archive offset behavior of the reader to be configured.
...
Aside from supporting the current behavior which allows archives to be
preceded by arbitrary data (added in fc749a09), this also allows
detection of the offset to use by checking whether a central directory
header is at the expected location. This is configurable because if the
behavior were based only on detection, there could be false positives if
archive data happened to contain a central directory header at the right
spot.
2024-05-29 13:59:20 -04:00
Danny McClanahan
a769e9410e
Revert "interpose ZipRawValues into ZipFileData"
...
This reverts commit d8d4dee5cec372878259380fa347c0ffc6cca044.
2024-05-24 08:00:04 -04:00
Danny McClanahan
fe663b9ee6
tiny fix
2024-05-24 07:58:06 -04:00
Danny McClanahan
4a784b5636
interpose ZipRawValues into ZipFileData
2024-05-24 07:58:05 -04:00
Danny McClanahan
d852c222fc
review comments 1
2024-05-24 07:54:40 -04:00
Danny McClanahan
a7fd5874cf
reduce visibility for all the blocks
2024-05-24 07:54:40 -04:00
Danny McClanahan
3d6c4d1ae4
fix fuzz failure
2024-05-24 07:54:05 -04:00
Danny McClanahan
8fbc4039a8
lean more on the ::MAGIC trait constants
2024-05-24 07:54:04 -04:00
Danny McClanahan
cf2d980612
expose pub(crate) methods to convert compression methods
2024-05-24 07:53:15 -04:00