nodejs/node · info
reason: extra input\n
Error message
reason: extra input\n
What it means
Verbose diagnostic at brotli.c:1278, printed only when verbosity > 0, immediately after the 'corrupt input' message at line 1275. It specifies that the corruption was trailing data after a complete brotli stream (extra input) when allow_concatenated is false. This distinguishes it from truncated or comment-mismatch causes.
Source
Thrown at deps/brotli/c/tools/brotli.c:1278
context->next_in = context->input;
context->available_in = 1;
}
}
if (has_more_input) {
if (context->allow_concatenated) {
if (context->verbosity > 0) {
fprintf(stderr, "extra input\n");
}
if (!ProvideOutput(context)) return BROTLI_FALSE;
BrotliDecoderDestroyInstance(context->decoder);
context->decoder = NULL;
if (!InitDecoder(context)) return BROTLI_FALSE;
s = context->decoder;
} else {
fprintf(stderr, "corrupt input [%s]\n",
PrintablePath(context->current_input_path));
if (context->verbosity > 0) {
fprintf(stderr, "reason: extra input\n");
}
return BROTLI_FALSE;
}
} else {
if (context->verbosity > 0) {
context->end_time = clock();
fprintf(stderr, "Decompressed ");
PrintFileProcessingProgress(context);
fprintf(stderr, "\n");
}
/* Final check */
if (context->comment_state != COMMENT_OK) {
fprintf(stderr, "corrupt input [%s]\n",
PrintablePath(context->current_input_path));
if (context->verbosity > 0) {
fprintf(stderr, "reason: comment mismatch\n");
}
}View on GitHub (pinned to 1b2de5e052)
Solutions
- Use the 'extra input' diagnosis to investigate trailing bytes in the file.
- Enable concatenated-stream mode if the trailing data is another valid brotli stream.
- Strip non-brotli trailing bytes before decompression.
- Re-examine the compression pipeline to ensure no extra data is appended to the .br output.
Defensive patterns
Strategy: validation
Validate before calling
// Verbose diagnostic for error 725. Same prevention: ensure no trailing // non-brotli data when allow_concatenated is disabled.
Prevention
- Use -v to confirm the root cause is trailing data, then strip it or enable concatenated mode.
- Inspect files with a hex dump (xxd) to identify unexpected trailing bytes.
- Document file format boundaries when wrapping brotli streams in custom containers.
When it happens
Trigger: Same condition as error 725: extra bytes follow a successfully decoded brotli stream while allow_concatenated is disabled. This message appears only when the user ran with -v (verbosity > 0).
Common situations: A developer debugging a 'corrupt input' failure runs 'brotli -d -v file.br' and sees 'reason: extra input', revealing that the file has trailing data beyond the brotli stream boundary. The file may have been packaged with extra metadata, footers, or was accidentally concatenated.
Related errors
- reason: comment mismatch\n
- reason: truncated input\n
- extra input\n
- empty output file name for [%s] input file\n
- input file [%s] suffix mismatch\n
AI-assisted analysis of nodejs/node@1b2de5e052 (2026-08-13).
Data as JSON: /api/errors/73bc52b577c79aad.
Report an issue: GitHub.