zstd-rs icon indicating copy to clipboard operation
zstd-rs copied to clipboard

zstd::bulk::decompress: says "less than" instead of "less or equal"

Open safinaskar opened this issue 2 years ago • 3 comments

zstd::bulk::decompress: says "less than" instead of "less or equal". Using this code:

fn main() {
    let src = b"abc";
    let compressed = zstd::bulk::compress(src, 1).unwrap();
    assert_eq!(zstd::bulk::decompress(&compressed, src.len()).unwrap(), src);
}

we can verify that "less or equal" was intended

safinaskar avatar Aug 22 '23 09:08 safinaskar

Indeed, thanks for the report! Should now be fixed.

gyscos avatar Oct 11 '23 14:10 gyscos

Docs of function zstd::bulk::decompress still look same: https://docs.rs/zstd/0.13.0/zstd/bulk/fn.decompress.html

safinaskar avatar Oct 12 '23 13:10 safinaskar

Oh right I only updated Decompressor::decompress(). Fixing that now.

gyscos avatar Oct 12 '23 14:10 gyscos