Skip to content

Commit 78ca174

Browse files
committed
More informative README on backends
1 parent c9a3efa commit 78ca174

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

README.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,20 @@ fn main() {
6767

6868
## Backends
6969

70-
The default `miniz_oxide` backend has the advantage of being pure Rust.
70+
The default `miniz_oxide` backend has the advantage of only using safe Rust.
7171

72-
If you want maximum performance while still benefiting from a pure rust
73-
implementation, you can use `zlib-rs`:
72+
If you want maximum performance while still benefiting from a Rust
73+
implementation at the cost of some `unsafe`, you can use `zlib-rs`:
7474

7575
```toml
7676
[dependencies]
7777
flate2 = { version = "1.0.17", features = ["zlib-rs"], default-features = false }
7878
```
7979

80-
Or, you can use the zlib-ng C library:
80+
### C backends
81+
82+
While zlib-rs is [the fastest overall](https://trifectatech.org/blog/zlib-rs-is-faster-than-c/),
83+
the zlib-ng C library can be slightly faster in certain cases:
8184

8285
```toml
8386
[dependencies]

0 commit comments

Comments
 (0)