Commit graph

348 commits

Author SHA1 Message Date
Lireer
3a71893711 run cargo fmt 2022-01-25 20:57:27 +01:00
Lireer
35d8f04496 "fix" clippy warnings 2022-01-25 20:42:51 +01:00
Lireer
bb97711761 explain trait guarantee violation of read impl 2022-01-25 20:39:22 +01:00
Lireer
d7f0a182b6 Merge remote-tracking branch 'zip-rs/zip/master' 2022-01-25 17:48:45 +01:00
Plecra
cfe3bbfa26
Merge branch 'master' into no-thiserror 2022-01-23 17:36:27 +00:00
Alexander Zaitsev
5a4ca9557c fix: permissions are not copied
- fix a small bug when permissions where not copied
- add must_use attribute to the all FileOptions methods

Tested:
- No
2022-01-23 20:16:01 +03: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
Steve Myers
0ee34bd105
Bump MSRV to 1.52.0 and fix cargo fmt and doc 2021-10-25 10:31:46 -07:00
Steve Myers
2f71810c07
Upgrade time dependency to "0.3"
Versions of time crate prior to 0.2.23 fail audit due to RUSTSEC-2020-0071.

Crate: time
Version: 0.1.43
Title: Potential segfault in the time crate
Date: 2020-11-18
ID: RUSTSEC-2020-0071
URL: https://rustsec.org/advisories/RUSTSEC-2020-0071
Solution: Upgrade to >=0.2.23
2021-10-21 21:31:37 -07:00
Emmanuel Gil Peyrot
70696f57c1 Remove dependency on thiserror
On my computer, this halves the total build time from 11.7s to 5.4s, as
well as the total size of the artifacts in target.

This derive macro is nice, but it doesn’t justify the increase in
compilation time for dependent crates imo.

This effectively reverts #135, although using the up to date APIs from
std::error::Error.
2021-09-06 23:35:57 +02:00
Lireer
46f65d4d49 add aes-crypto feature to default and update README 2021-08-06 12:42:35 +02:00
Lireer
09ad713d20 update crypto dependencies 2021-08-06 12:40:57 +02:00
Lireer
75e8f6bab5 use less feature gates if no further dependencies are needed 2021-08-06 12:38:04 +02:00
Lireer
8f352c30f1 add missing documentation 2021-08-05 21:16:11 +02:00
Lireer
48b52a7e86 move AesMode and AesVendorVersion out of aes-crypto feature 2021-08-05 21:16:11 +02:00
Lireer
ed94e8b369 test if using the wrong key size panics 2021-08-05 21:06:47 +02:00
Lireer
5f0ae55eae Document possible panics 2021-08-05 21:06:47 +02:00
Lireer
5532fd6f09 Document aes related modules 2021-08-05 21:06:47 +02:00
Lireer
354993d906 feature gate aes decryption 2021-08-05 21:06:47 +02:00
Lireer
0820cc4fe2 fix more clippy warnings 2021-08-05 20:29:51 +02:00
Lireer
ff23539624 differentiate between ae1 and ae2 2021-08-05 20:28:14 +02:00
Lireer
8ffc2d1545 cargo fmt and clippy 2021-08-04 20:26:31 +02:00
Lireer
e69df5cf64 finalize aes decryption 2021-08-04 20:08:12 +02:00
Lireer
d25d6f5f57 finalize AesReader validation and most of decryption 2021-08-04 19:56:14 +02:00
Lireer
12260f5623 disable crc32 checks when handling aes encrypted data 2021-08-04 19:56:14 +02:00
Lireer
852ab625fb initial aes reader 2021-08-04 19:02:22 +02:00
Lireer
4877a6afd4 test different aes modes and data sizes 2021-08-02 19:47:47 +02:00
Marc Brinkmann
4afe4d3b2c Optimize AES code, use less copies 2021-08-02 19:42:49 +02:00
Marc Brinkmann
a5d1905db6 Simpify aes_ctr API to just crypt 2021-08-02 19:42:49 +02:00
Marc Brinkmann
9f6ee0f4b6 Add crypt convenience function 2021-08-02 19:42:49 +02:00
Marc Brinkmann
a265ba7fa5 Create initial aes_ctr module 2021-08-02 19:42:49 +02: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
aee5ff09bc Fix unit test in types.rs 2021-05-02 04:10:32 +02:00
Benjamin Richner
80f4c43369 Add Info-ZIP password validation 2021-05-02 04:02:50 +02:00
Marli Frost
8ecbdb1870
chore: update to bzip 0.4 2021-04-19 12:29:19 +01:00
Plecra
ce272616ac
Merge pull request #215 from Contextualist/append
Support append to an existing archive
2021-04-19 12:06:26 +01:00
Marli Frost
44352aa34b
fix: allow non-utf8 comments in ZipWriter 2021-04-19 12:02:32 +01:00
Benoît du Garreau
7a05b1a783 Remove io::Read + io::Seek bound to ZipArchive 2021-04-10 14:13:57 +02:00
zhanghar
32b2f5b483 refactor: use iterator for file list init 2021-02-25 23:54:20 -05:00
zhanghar
4ce5791164 chore: use pub(crate) for header parsing
used internally by the appendable ZipWriter
2021-02-25 23:50:31 -05:00
Marli Frost
f02ad80c70
docs: update links to documentation 2021-02-14 12:37:29 +00:00
Rouven Spreckels
129d7301ef Note that large_file() requires ZIP64 support. 2021-02-07 12:46:52 +01: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