Skip to content

Commit cb6d21e

Browse files
committed
Use zlib-rs for featuremax-performance
Signed-off-by: Jiahao XU <[email protected]>
1 parent d0ef276 commit cb6d21e

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-2
lines changed

Cargo.lock

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gix-features/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ crc32 = ["dep:crc32fast"]
6767
zlib = ["dep:flate2", "flate2?/rust_backend", "dep:thiserror"]
6868
## Use the C-based zlib-ng backend, which can compress and decompress significantly faster.
6969
zlib-ng = ["zlib", "flate2?/zlib-ng"]
70+
## Use the rust-based zlib backend, which can compress and decompress significantly faster and is on par with zlib-ng or even faster.
71+
zlib-rs = ["zlib", "flate2?/zlib-rs"]
7072
## Use zlib-ng via its zlib-compat API. Useful if you already need zlib for C
7173
## code elsewhere in your dependencies. Otherwise, use zlib-ng.
7274
zlib-ng-compat = ["zlib", "flate2?/zlib-ng-compat"]

gix/Cargo.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,9 +252,9 @@ pack-cache-lru-static = ["gix-pack/pack-cache-lru-static"]
252252
## Provide a hash-map based LRU cache whose eviction is based a memory cap calculated from object data.
253253
pack-cache-lru-dynamic = ["gix-pack/pack-cache-lru-dynamic"]
254254

255-
## Activate other features that maximize performance, like usage of threads, `zlib-ng` and access to caching in object databases.
255+
## Activate other features that maximize performance, like usage of threads, `zlib-rs` and access to caching in object databases.
256256
## Note that some platforms might suffer from compile failures, which is when `max-performance-safe` should be used.
257-
max-performance = ["max-performance-safe", "zlib-ng", "fast-sha1"]
257+
max-performance = ["max-performance-safe", "zlib-rs", "fast-sha1"]
258258

259259
## If enabled, use assembly versions of sha1 on supported platforms.
260260
## This might cause compile failures as well which is why it can be turned off separately.
@@ -264,6 +264,9 @@ fast-sha1 = ["gix-features/fast-sha1"]
264264
## Note that this will cause duplicate symbol errors if the application also depends on `zlib` - use `zlib-ng-compat` in that case.
265265
zlib-ng = ["gix-features/zlib-ng"]
266266

267+
## Use the rust-based zlib backend, which can compress and decompress significantly faster and is on par with zlib-ng or even faster.
268+
zlib-rs = ["gix-features/zlib-rs"]
269+
267270
## Use zlib-ng via its zlib-compat API. Useful if you already need zlib for C
268271
## code elsewhere in your dependencies. Otherwise, use `zlib-ng`.
269272
zlib-ng-compat = ["gix-features/zlib-ng-compat"]

0 commit comments

Comments
 (0)