Chris Hennick
5e03f43f9a
Fix failing tests other than deflate64 bug 25
2024-03-07 15:16:04 -08:00
Chris Hennick
e23ba853d3
Remove comment field from Shared
to avoid unnecessary copying
2024-03-07 14:43:40 -08:00
Chris Hennick
8efd2339cf
Overhaul read logic to perform *all* validations before accepting a central directory as the real one
2024-03-07 14:34:40 -08:00
Chris Hennick
be49def529
Replace hard-coded byte array with data file
2024-03-06 12:34:51 -08:00
Chris Hennick
ce11179be3
Add test case for https://github.com/anatawa12/deflate64-rs/issues/25
2024-03-04 17:35:12 -08:00
Chris Hennick
c1afa95706
Refactor: use a zip file with valid metadata
2024-03-03 18:01:31 -08:00
Chris Hennick
f4d5ad7b49
Bug fix: can't run new test if deflate64 is disabled
2024-03-03 18:00:05 -08:00
Chris Hennick
80876aa7e4
Bug fix: incorrect assertion for new test
2024-03-03 17:36:58 -08:00
Chris Hennick
fe3821c4c0
Add test case to reproduce deflate64 error
2024-03-03 17:29:27 -08:00
anatawa12
4812d77e5b
Merge remote-tracking branch 'zip-next/master' into deflate64-next
2023-10-13 19:58:44 +09:00
anatawa12
70c0b164be
chore: use streaming in deflate64 crate
2023-08-04 22:55:48 +09:00
anatawa12
065058d30d
feat: support deflate64 compression with deflate64 crate
2023-08-04 21:52:08 +09:00
Chris Hennick
3cb826fe8b
Make functions const
where possible
2023-06-07 22:15:06 -07:00
Chris Hennick
2407ef95c6
Fixes and refactors for no-features build
2023-05-30 18:17:59 -07:00
Chris Hennick
9ec0ddc5ca
Add zlib-ng
2023-05-30 09:18:26 -07:00
Chris Hennick
46333b2d61
Fix Clippy warning: rev().next()
-> next_back()
2023-05-21 11:39:22 -07:00
Chris Hennick
5d16fa250c
Revert "Wrap extra-data field in an Option, to save Arc overhead when empty"
...
This reverts commit 1df9186527
.
2023-05-15 21:25:34 -07:00
Chris Hennick
1df9186527
Wrap extra-data field in an Option, to save Arc overhead when empty
2023-05-15 20:23:46 -07:00
Chris Hennick
df3dfc1991
Change Rc to Arc since sharing across ZipWriter instances is possible
2023-05-14 10:45:13 -07:00
Chris Hennick
dbf39339de
Wrap extra data in Rc so FileOptions and ZipFileData can be cloned faster
2023-05-14 09:20:15 -07:00
Chris Hennick
21ff795071
Additional sanity checks on ZIP64 footer
2023-05-14 08:28:52 -07:00
Chris Hennick
4faebb4468
Overhaul extra-data interface
2023-05-13 13:59:14 -07:00
Chris Hennick
9b65b8a523
Bug fix
2023-05-12 09:07:42 -07:00
Chris Hennick
dd83186928
Bug fixes: validation was too stringent
2023-05-12 08:54:00 -07:00
Chris Hennick
546693a6c7
Test allowing ZIP64 magic with the sanity checks
2023-05-12 08:36:33 -07:00
Chris Hennick
70db61c26e
Perform sanity checks when both ZIP32 and ZIP64 footers are found
2023-05-12 08:28:30 -07:00
Chris Hennick
5cd0b75209
Reformat
2023-05-11 20:17:01 -07:00
Chris Hennick
332d09f51a
Bug fix
2023-05-11 20:14:26 -07:00
Chris Hennick
3c44f2812c
Remove unused imports
2023-05-11 19:28:54 -07:00
Chris Hennick
dc351196e2
Bug fix: don't allow writing files with certain ZIP64 magic strings in their names
2023-05-11 18:52:41 -07:00
Chris Hennick
ebb4e01329
Slightly stronger assertion
2023-05-11 10:13:09 -07:00
Chris Hennick
06b89f93ea
Fix a failing unit test
2023-05-11 09:59:56 -07:00
Chris Hennick
2ad4c20681
Reformat and fix Clippy warning
2023-05-11 09:35:12 -07:00
Chris Hennick
8c6816fb33
Bug fixes: file can't be ZIP64 if CDR start is after CDR end
2023-05-11 09:33:06 -07:00
Chris Hennick
5bb40012d2
WIP: Fix upstream merge
2023-05-08 19:37:55 -07:00
Chris Hennick
006fd57bf5
Bug fix: reject file that's valid but unsupported as ZIP64
2023-05-05 09:25:52 -07:00
Chris Hennick
0beb5b4294
Bug fixes and formatting
2023-05-05 09:15:46 -07:00
Chris Hennick
29a3f30a72
Bug fix: try decoding file as ZIP32 if it's not valid as ZIP64
2023-05-05 09:11:49 -07:00
Chris Hennick
6e7ff280e9
Revert "Perform an extra sanity check on ZIP64 detection"
...
This reverts commit 475b55df1d
.
2023-05-04 20:34:44 -07:00
Chris Hennick
475b55df1d
Perform an extra sanity check on ZIP64 detection
2023-05-04 20:29:26 -07:00
Chris Hennick
cde5d5ed11
Implement shallow copy from within the file being written
2023-04-23 14:33:10 -07:00
Marli Frost
c4c6ec9e7c
fix: clippy
2023-02-01 18:03:03 +00:00
Marli Frost
d06d4b295f
refactor: move the new ZipStreamReader API to the unstable module
2023-02-01 17:55:07 +00:00
Jiahao XU
02c3699be2
Impl new mod read::stream
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-01 17:33:35 +00:00
Jiahao XU
16753209af
Refactor: Extract ZipFileData::unix_mode
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-01 17:33:35 +00:00
Jiahao XU
a614d1f226
Refactor: Extract ZipFileData::enclosed_name
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-01 17:33:35 +00:00
Jiahao XU
08c2e76705
Fix param order in central_header_to_zip_file_inner
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-01 17:31:12 +00:00
Jiahao XU
e99c15471c
Mv central header parsing to central_header_to_zip_file
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-01 17:31:12 +00:00
Jiahao XU
57440efa16
Refactor: Extract new fn central_header_to_zip_file_inner
...
that does not require `reader` to implement `io::Seek`.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-02-01 17:31:12 +00:00
Mikael Pettersson
3fc54cf68c
feat: Detect insufficient Dir record size
...
- Per zip spec 4.4.1.4 (https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT )
- If a CentralDirectoryEnd record field cannot hold the
required data, a ZIP64 record must exist and the
field will be set to -1(0xFFFF || 0xFFFFFFFF)
- Previously these archives were incorrectly detected as multi-disk
2023-01-30 11:13:01 +01:00