compress.rs line 70 uses zstd::bulk::compress() which creates a new compression context per call. Should use zstd::bulk::Compressor which holds a persistent context and reuses it.
Additionally, the compressed output is cloned (out_buf.clone()) — a TODO in the code acknowledges this unnecessary copy.
compress.rsline 70 useszstd::bulk::compress()which creates a new compression context per call. Should usezstd::bulk::Compressorwhich holds a persistent context and reuses it.Additionally, the compressed output is cloned (
out_buf.clone()) — a TODO in the code acknowledges this unnecessary copy.