Skip to content

codec: default to all-bytes reader for decompression codecs#397

Merged
mmatczuk merged 3 commits intomainfrom
connect-1998
Mar 19, 2026
Merged

codec: default to all-bytes reader for decompression codecs#397
mmatczuk merged 3 commits intomainfrom
connect-1998

Conversation

@twmb
Copy link
Copy Markdown
Contributor

@twmb twmb commented Mar 17, 2026

Summary

  • When a decompression codec like gzip is specified without a reader codec suffix, defaults to all-bytes instead of returning an error
  • This makes gzip equivalent to gzip/all-bytes, pgzip equivalent to pgzip/all-bytes, etc.
  • Previously, users had to specify the full gzip/all-bytes form or they would get the confusing error "codec was not recognised: [gzip]"

Test plan

  • New test TestGzipDefaultsToAllBytes verifies that "gzip" alone works identically to "gzip/all-bytes"
  • All existing codec tests pass

Closes redpanda-data/connect#1998

🤖 Generated with Claude Code

twmb and others added 3 commits March 16, 2026 18:54
When a decompression codec like 'gzip' is specified without a reader
codec suffix, default to 'all-bytes' instead of returning an error.
This makes 'gzip' equivalent to 'gzip/all-bytes'.

Closes redpanda-data/connect#1998

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@claude
Copy link
Copy Markdown

claude bot commented Mar 19, 2026

Commits
LGTM

Review
Clean, well-scoped change that defaults bare decompression codecs (e.g. gzip) to all-bytes instead of returning an unrecognized codec error. The fallback in chainedReader is safe since "all-bytes" is a hardcoded known-good codec. Test coverage is adequate via the shared testReaderSuite.

LGTM

@mmatczuk mmatczuk merged commit a4bdfbb into main Mar 19, 2026
3 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.

Consider setting a default reader codec for decompression codecs

2 participants