mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-17 16:32:11 +01:00
fuzz/c/std: enlarge the brotli fuzzer's encoder dst; clarify brcat's parity claim
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UZ978Fjdsyig4v3wYAZRg5
This commit is contained in:
2 files changed
+11
-5
No files matched your search
@@ -22,10 +22,13 @@ Flags:
|
||||
-quality=N the encoder's quality, 0 to 11. The default is 11.
|
||||
-fail-if-unsandboxed exit with an error if the seccomp sandbox failed.
|
||||
|
||||
The encoder's output is byte-for-byte identical to the brotli reference
|
||||
implementation's (libbrotlienc v1.2.1) with the same quality, lgwin and large
|
||||
window parameters, on every platform. Like that reference implementation,
|
||||
qualities 10 and 11 are much slower than lower qualities.
|
||||
The encoder's output is byte-for-byte identical, on every platform, to what
|
||||
the brotli reference implementation's library (libbrotlienc v1.2.1) produces
|
||||
for the same parameters and the same sequence of calls. That output depends
|
||||
on how the input is split into calls (for example, the first call's length is
|
||||
the default size hint), so it can differ from the "brotli" command line tool's,
|
||||
which reads 512 KiB at a time and sets a size hint. Like that reference
|
||||
implementation, qualities 10 and 11 are much slower than lower qualities.
|
||||
|
||||
To run:
|
||||
|
||||
|
||||
@@ -132,7 +132,10 @@ static const uint8_t g_serialized_dictionary[] = {
|
||||
// at qualities 10 and 11, which are slow.
|
||||
#define ENC_MAX_INPUT 65536
|
||||
#define ENC_MAX_INPUT_HQ 4096
|
||||
#define ENC_DST_ARRAY_SIZE (2 * ENC_MAX_INPUT + 65536)
|
||||
// With 1-byte chunks and frequent flushes, each input byte can become its own
|
||||
// metablock plus a padding block (about 4 bytes per input byte at qualities 0
|
||||
// and 1), so the dst buffer is sized well above that.
|
||||
#define ENC_DST_ARRAY_SIZE (8 * ENC_MAX_INPUT + 65536)
|
||||
|
||||
static wuffs_brotli__encoder g_encoder;
|
||||
static wuffs_brotli__decoder g_rt_decoder;
|
||||
|
||||
Reference in new issue
Block a user