Skip to content

fix(parquet/compress): Brotli CompressBound#884

Merged
zeroshade merged 1 commit into
apache:mainfrom
fallintoplace:fix-brotli-compress-bound
Jul 3, 2026
Merged

fix(parquet/compress): Brotli CompressBound#884
zeroshade merged 1 commit into
apache:mainfrom
fallintoplace:fix-brotli-compress-bound

Conversation

@fallintoplace

Copy link
Copy Markdown
Contributor

What changed

Brotli CompressBound now returns the computed maximum compressed size instead of the input length. The empty-input case is also handled before the debug assertion so it remains valid with -tags assert.

Why

The Codec contract says callers can use CompressBound to allocate a destination buffer large enough for compressed output. Returning the input length could under-report the bound for Brotli and cause callers to allocate too little.

Validation

  • go test ./parquet/compress
  • go test -tags assert ./parquet/compress
  • PARQUET_TEST_DATA=parquet-testing/data PARQUET_TEST_BAD_DATA=parquet-testing/bad_data go test ./parquet/...

@fallintoplace fallintoplace requested a review from zeroshade as a code owner July 2, 2026 18:16
@zeroshade zeroshade changed the title Fix Brotli CompressBound fix(parquet/compress): Brotli CompressBound Jul 2, 2026
@zeroshade

Copy link
Copy Markdown
Member

just needs a rebase

@fallintoplace

Copy link
Copy Markdown
Contributor Author

@zeroshade I will have a look in a few hours, thank you for your attention.

@fallintoplace fallintoplace force-pushed the fix-brotli-compress-bound branch from 3c52399 to 5cf8d36 Compare July 2, 2026 22:14
@zeroshade zeroshade merged commit a01f014 into apache:main Jul 3, 2026
26 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants