Fuzzing the decompressor
While panicking is acceptable in case of a programming error in your code, it should never be due to an incorrect user input, which is what fuzzing will test.
✅ Use
cargo fuzz
to feed arbitrary data to your decoder.
Your decoder should never crash. Of course, it might return an error, but the error should be meaningful and not result in a memory corruption.
💫 Congratulations, you now have a robust Zstandard decoder!