Skip to content

Commit

Permalink
check decompression in fuzzer
Browse files Browse the repository at this point in the history
  • Loading branch information
a10y committed Aug 15, 2024
1 parent e11edb1 commit 4208f22
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fuzz/fuzz_targets/fuzz_compress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@ use libfuzzer_sys::fuzz_target;

fuzz_target!(|data: &[u8]| {
let table = fsst_rs::train("the quick brown fox jumped over the lazy dog".as_bytes());
let _ = table.compress(data);
let compress = table.compress(data);
let decompress = table.decompress(&compress);
assert_eq!(&decompress, data);
});

0 comments on commit 4208f22

Please sign in to comment.