Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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!