gyscos / zstd-rs

A rust binding for the zstd compression library.
MIT License
510 stars 107 forks source link

Incorrect compression level range in zstd::stream::write::Encoder #208

Closed ariel-miculas closed 1 year ago

ariel-miculas commented 1 year ago

In https://docs.rs/zstd/0.12.3+zstd.1.5.2/zstd/stream/write/struct.Encoder.html#method.new, shouldn't the compression level be in the range (1,22) instead of (1,21)? In zstd 1.5.1 it says:

The library supports regular compression levels from 1 up to ZSTD_maxCLevel(), which is currently 22

gyscos commented 1 year ago

Indeed, the comment appears incorrect (maybe outdated?).