File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -67,17 +67,20 @@ fn main() {
67
67
68
68
## Backends
69
69
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.
71
71
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 ` :
74
74
75
75
``` toml
76
76
[dependencies ]
77
77
flate2 = { version = " 1.0.17" , features = [" zlib-rs" ], default-features = false }
78
78
```
79
79
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:
81
84
82
85
``` toml
83
86
[dependencies ]
You can’t perform that action at this time.
0 commit comments