Commit graph

435 commits

Author SHA1 Message Date
Chris Hennick
cb50ca1213
test: Bug fix? Explicitly type int that may become as large as 3 << 29 2024-06-03 21:12:54 -07:00
Chris Hennick
c06f49b153
ci(fuzz): Fix: T::arbitrary returns Result 2024-06-03 20:43:49 -07:00
Chris Hennick
c0cc03c0e7
style: cargo fmt --all 2024-06-03 20:25:36 -07:00
Chris Hennick
ad218a6c9c
ci(fuzz): Allow zopfli_buffer_size to be 3 * power of 2 2024-06-03 20:23:46 -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
28fb992532
chore: Refactor alignment field write logic 2024-06-02 17:37:45 -07:00
Chris Hennick
2a131e67a9
fix: Use deflate-flate2 flag to guard import 2024-06-02 17:29:49 -07:00
Chris Hennick
79fc5a9cdd
chore: Fix a build error 2024-06-02 17:06:10 -07:00
Chris Hennick
8e92cc4d81
chore: Fix a build error 2024-06-02 17:03:32 -07:00
Chris Hennick
888e5fac16
fix: Switch padding field ID to one documented in APPNOTE 2024-06-02 16:09:19 -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
Chris Hennick
bf7c8d21fb
style: cargo fmt --all 2024-05-27 17:20:46 -07:00
Chris Hennick
0c7b0080f3
chore: Bug fixes for debug implementation 2024-05-27 17:18:31 -07:00
Chris Hennick
8d81cbc2c3
chore: Bug fixes for debug implementation 2024-05-27 17:11:24 -07:00
Chris Hennick
48b1adb64b
fix: Derive Debug for ZipWriter 2024-05-27 16:58:12 -07:00
Chris Hennick
fdb01c3dd2
style: cargo fmt --all 2024-05-25 15:10:31 -07:00
Chris Hennick
eb949ebdef
chore: Update unit tests 2024-05-25 15:05:02 -07:00
Chris Hennick
15f8bac454
chore: Remove unused import 2024-05-25 14:51:18 -07:00
Chris Hennick
edbb7343f5
refactor: use a MIN_VERSION constant 2024-05-25 14:29:36 -07:00
Chris Hennick
40f20d8a6b
fix: lower default version to 4.5 and use the version-needed-to-extract where feasible. 2024-05-25 14:29:35 -07:00
Chris Hennick
92012b9795
chore: Tweaks to make version_needed and version_made_by work with recently-merged changes 2024-05-24 21:55:18 -07:00
Chris Hennick
cda4712153
fix: version-needed-to-extract was incorrect in central header, and version-made-by could be lower than that (#100) 2024-05-24 21:47:06 -07:00
Chris Hennick
a28b16e69c
Apply suggestions from code review
Fix errors

Signed-off-by: Chris Hennick <4961925+Pr0methean@users.noreply.github.com>
2024-05-24 15:27:28 -07:00
Chris Hennick
df70f6a320
Fix unmatched bracket due to bad merge
Signed-off-by: Chris Hennick <4961925+Pr0methean@users.noreply.github.com>
2024-05-24 14:57:06 -07:00
Chris Hennick
6b19c877e2
Merge branch 'master' into bulk-parsing
Signed-off-by: Chris Hennick <4961925+Pr0methean@users.noreply.github.com>
2024-05-24 14:50:21 -07:00
Chris Hennick
294564c1a8
style: cargo fmt --all 2024-05-24 14:26:12 -07:00
Chris Hennick
0636bd7411
fix: version-needed-to-extract was incorrect in central header, and version-made-by could be lower than that (#100) 2024-05-24 14:24:55 -07:00
Danny McClanahan
80ca254569
fix doc comments 2024-05-24 08:15:16 -04:00
Danny McClanahan
a769e9410e
Revert "interpose ZipRawValues into ZipFileData"
This reverts commit d8d4dee5cec372878259380fa347c0ffc6cca044.
2024-05-24 08:00:04 -04:00
Danny McClanahan
4a784b5636
interpose ZipRawValues into ZipFileData 2024-05-24 07:58:05 -04:00
Danny McClanahan
0b31d9846a
review comments 2 2024-05-24 07:54:41 -04:00
Danny McClanahan
21d07e192c
add ExtraFieldMagic and Zip64ExtraFieldBlock 2024-05-24 07:54:39 -04:00
Danny McClanahan
cf2d980612
expose pub(crate) methods to convert compression methods 2024-05-24 07:53:15 -04:00
Danny McClanahan
ad1d51d099
write file comment to central directory header 2024-05-24 07:52:30 -04:00
Danny McClanahan
ea308499af
bulk parsing and bulk writing
- use blocks for reading individual file headers
- remove unnecessary option wrapping for stream entries
- create Block trait
- add coerce method to reduce some boilerplate
- add serialize method to reduce more boilerplate
- use to_le! and from_le!
- add test case
- add some docs
- rename a few structs to clarify zip32-only
2024-05-24 07:52:25 -04:00
Chris Hennick
da8be86761
style: cargo fmt --all 2024-05-23 15:53:37 -07:00
Chris Hennick
7d61377503
refactor: Change type of last_modified_time to Option<DateTime> 2024-05-23 14:15:38 -07:00
Chris Hennick
b0c666aa0c
chore: Continue to accept archives with invalid DateTime, and use now_utc() as default only when writing, not reading 2024-05-23 09:44:06 -07:00
Chris Hennick
42af7158e9
style: cargo fmt --all 2024-05-21 08:46:24 -07:00
Chris Hennick
a731f2a4c6
refactor: Merge the hidden deflate-flate2 flag into the public one 2024-05-20 18:02:30 -07:00
Chris Hennick
870f915bc5
refactor: Rename _deflate-non-zopfli to _deflate-flate2 2024-05-20 12:02:05 -07:00
Chris Hennick
6071dc13b0
perf: Change default compression implementation to flate2/zlib-ng 2024-05-20 11:55:51 -07:00
Chris Hennick
be8cb432f6
style: cargo fmt --all 2024-05-13 20:22:11 -07:00
Chris Hennick
3bf0301e39
feat: Add is_symlink method 2024-05-13 19:52:14 -07:00
Chris Hennick
8eb5a75a87
style: Merge patches from code into non_utf8.zip 2024-05-10 09:01:17 -07:00
Chris Hennick
186c89deea
chore: String has into_bytes but not into_boxed_bytes 2024-05-09 19:11:16 -07:00
Chris Hennick
f7ea2764a2
chore: &str doesn't have into_boxed_bytes, so call to_string first 2024-05-09 19:08:55 -07:00
Chris Hennick
35b3a8f257
chore: fix type mismatch in shallow_copy_file caused by last fix 2024-05-09 19:06:44 -07:00
Chris Hennick
34b99956c9
chore: shallow_copy_file needs to update file_name_raw 2024-05-09 19:04:08 -07:00
Chris Hennick
650dd9a71f
chore: More patches to binary file 2024-05-09 18:57:15 -07:00