You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let sz = decompress_to_buffer(src, uncompressed_size,&mut buffer)?;
222
+
buffer.truncate(sz);
222
223
Ok(buffer)
223
224
}
224
225
@@ -294,6 +295,18 @@ mod test {
294
295
295
296
usesuper::compress_to_buffer;
296
297
298
+
/// This test will fail unless the buffer created by decompress is correctly truncated
299
+
#[test]
300
+
fndecompress_truncate_test(){
301
+
let src = "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111".as_bytes();
302
+
let rs_compressed = compress(src,None,false).unwrap();
0 commit comments