mirror of
https://github.com/google/brotli.git
synced 2026-07-08 17:56:58 +00:00
Error groups #292
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @andrew-aladev on GitHub (Sep 12, 2019).
Hello. I see brotli provides a wide list of errors:
Today all these error codes have only one group:
BROTLI_DECODER_RESULT_ERROR.So if user want to know when decoder received corrupted source he have to list all 16 codes. It makes too tight and unreliable connection between brotli implementation and application.
Can you please provide several error groups like:
BROTLI_DECODER_RESULT_CORRUPTED_SOURCE,BROTLI_DECODER_RESULT_ALLOCATION_FAILEDand etc? Thank you.@eustas commented on GitHub (Jan 28, 2020):
Actually, there are 2 groups of errors - "corrupted stream" and "fatal".
"fatal" means that:
The preferred way to deal with allocation problems is to use "custom memory manager" API. This way the embedder could decide what to do - wait until there is more memory accessible, or interrupt decoding. Even more - it helps to control the memory budget for a bunch of decoders...