Commit graph

128 commits

Author SHA1 Message Date
Marli Frost
f1074bc6a9 doc: remove re-exports section from crate root
Making the paths to the types private forces rustdoc to render
the structs inline in the crate root.
This is simpler to see when first reading the API doc
2022-01-23 21:45:41 +00:00
Alexander Zaitsev
63e714f622 Merge branch 'master' into feature/add_zstd_compression 2022-01-23 19:17:26 +03:00
Alexander Zaitsev
e636399935 fix: fix all Clippy warnings
- some warnings are muted since fixing them right now can be a breaking
  API change
- fix Clippy warns in the src, examples and tests

Tested:
- Local test run
2022-01-23 18:54:43 +03:00
Alexander Zaitsev
061cdf149f fix: fix Clippy warnings
- fix a bunch of Clippy warnings
- fix some usages of assert! (change to assert_ne)

Tested:
- Local unit-tests run
2022-01-23 17:35:27 +03:00
Alexander Zaitsev
0b82d905b3 feat: add Zstandard compression
- add dependency on zstd crate
- add zstd feature to Cargo.toml
- update README
- update example with Zstd
- add Zstd support to the library

Notes:
- This work is mainly based on this original PR: https://github.com/zip-rs/zip/pull/240

Tested:
- During the development of the original PR
2022-01-23 14:49:48 +03:00
Alexander Zaitsev
8a666b102b fix: add header offset overflow check
- during the header offset calculation, perform overflow check

Tested:
- Local tests
2022-01-22 17:56:13 +03:00
Marli Frost
61de5d51ac
feat: constant for handling missing password 2021-06-04 18:42:20 +01:00
Marli Frost
3fd44ffd5d
Merge pull request #200 from qu1x/support-extra-field 2021-05-11 11:18:17 +01:00
Benjamin Richner
80f4c43369 Add Info-ZIP password validation 2021-05-02 04:02:50 +02:00
Plecra
ce272616ac
Merge pull request #215 from Contextualist/append
Support append to an existing archive
2021-04-19 12:06:26 +01:00
Benoît du Garreau
7a05b1a783 Remove io::Read + io::Seek bound to ZipArchive 2021-04-10 14:13:57 +02:00
zhanghar
4ce5791164 chore: use pub(crate) for header parsing
used internally by the appendable ZipWriter
2021-02-25 23:50:31 -05:00
Rouven Spreckels
e42c021448 Merge branch 'master' into support-extra-field 2021-02-04 11:40:38 +01:00
zhanghar
10da026ff6 feat: support append to an existing archive 2020-12-23 14:37:09 -05:00
Marli Frost
26710ee8a5 feat: read raw content of files 2020-12-06 23:36:41 +00:00
Rouven Spreckels
d53c8bdf07 Merge branch 'master' into support-extra-field 2020-11-16 11:57:08 +01:00
Plecra
4d8a068495
Merge pull request #98 from robmv/feature-copy
Add new APIs that allow copying zip file entries between zip files
2020-11-15 16:20:53 +00:00
Marli Frost
105368aebf docs: improve explanation of new APIs 2020-11-10 16:37:14 +00:00
Robert Marcano
5843d17d4c Add new APIs that allow copying zip file entries between zip files
The copy is done directly using the raw compressed data, avoiding
decompression and recompression.
2020-11-03 12:57:58 -04:00
Rouven Spreckels
e9a1de4e1b Fix marking parsed file as large. 2020-10-03 11:42:13 +02:00
Rouven Spreckels
9397773a32 Add ZIP64 write support. 2020-10-03 11:05:23 +02:00
Rouven Spreckels
a191c4b435 Support extra field. 2020-09-16 13:59:43 +02:00
Marli Frost
d0e905acc5
feat: provide archive extraction API 2020-09-12 11:03:11 +01:00
Marli Frost
103003388c
feat: implement a defensive sanitisation strategy 2020-09-12 10:51:23 +01:00
Marli Frost
fb5105725f
refactor: reintroduce path sanitization strategy
I've documented the drawbacks of this strategy to make sure users are
aware of the tradeoff being made.
2020-09-12 10:45:53 +01:00
Plecra
e7502199f9
Merge pull request #197 from mvdnes/unbreak-0.5
Remove breaking changes in 0.5.7
2020-09-10 11:42:53 +01:00
Marli Frost
5e5bd86915
refactor: remove extra variants from ZipError 2020-09-10 10:21:47 +01:00
Marli Frost
f863497e9b
feat: expose the location of the central header 2020-09-10 09:34:24 +01:00
Marli Frost
9d978e3c51 docs: remove clutter from doctest 2020-08-26 15:15:04 +01:00
Marli Frost
25d479e65d
chore: remove dead code for 0.5.7 2020-08-25 22:05:56 +01:00
Marli Frost
0b46263eac
fix: ZipArchive::extract incomplete
Path sanitization needs to be implemented before we can make this public
2020-08-19 15:12:35 +01:00
Marli Frost
d92a06adec
docs: deprecate poor Path sanitization 2020-08-19 13:53:21 +01:00
Marli Frost
599640c1eb
docs: remove redundant example 2020-08-19 13:52:46 +01:00
Marli Frost
bebecb8301
docs: use more descriptive language 2020-08-19 13:52:27 +01:00
Marli Frost
e8eb019e99
docs: simplify doctest 2020-08-19 13:51:50 +01:00
nickbabcock
ef5ce23d85 Fix overflow in directory counts of ZIP64 files 2020-08-10 21:22:49 -05:00
Plecra
510f1cce7b
Merge pull request #116 from zacps/extract
Add function to extract a all files in an archive to a directory
2020-06-26 09:32:46 +01:00
Zac Pullar-Strecker
a3aac29e85 switch extract from dynamic to static dispatch 2020-06-26 10:53:57 +12:00
Zac Pullar-Strecker
080292c6c3 Add doc comment about extract bailing without cleanup 2020-06-24 10:16:27 +12:00
Benjamin Richner
d4100190e5 run cargo fmt 2020-06-23 21:23:36 +02:00
Benjamin Richner
4f36a27c32 Use matcher clause instead of clumsy if expressions 2020-06-23 21:20:30 +02:00
Benjamin Richner
fb4f3c5c21 Rename by_name_internal to by_name_with_optional_password and by_index_internal to by_index_with_optional_password 2020-06-23 21:17:52 +02:00
Benjamin Richner
07caeca6ea Use let .. = &mut instead of let ref mut .. = 2020-06-23 21:12:36 +02:00
Benjamin Richner
d50dcaced7 run cargo fmt 2020-06-23 20:46:41 +02:00
Benjamin Richner
dbae003aca Merge improvements from master 2020-06-23 20:44:18 +02:00
Plecra
e123567862
Merge branch 'master' into any-flate2-backend 2020-06-23 16:51:15 +01:00
Jeremy Aube
d382f04e5a Change default comment to String::new() and fixed tests 2020-06-21 12:38:36 -04:00
Benjamin Richner
493afdbee1 run cargo fmt 2020-06-21 17:47:08 +02:00
Benjamin Richner
bd3ed222ac Merge improvements from master 2020-06-21 17:43:40 +02:00
Marli Frost
e8f576e179
chore: allow internal use of deprecated items 2020-06-17 18:20:40 +01:00