Skip to content

chore: migrate from eapache/go-xerial-snappy to klauspost/compress/sn…#3421

Merged
dnwe merged 3 commits intoIBM:mainfrom
edoardocomar:ec/snappy
Jan 11, 2026
Merged

chore: migrate from eapache/go-xerial-snappy to klauspost/compress/sn…#3421
dnwe merged 3 commits intoIBM:mainfrom
edoardocomar:ec/snappy

Conversation

@edoardocomar
Copy link
Copy Markdown
Member

@edoardocomar edoardocomar commented Jan 9, 2026

…appy/xerial

Replace eapache/go-xerial-snappy with klauspost/compress/snappy/xerial which is already used for other compression codecs (gzip, zstd).

  • Update Encode() API call to match new signature (Encode(dst, src []byte))
  • Update test expectations in record_test.go for new xerial format
  • Remove eapache/go-xerial-snappy dependency from go.mod
  • add functional roundtrip test with Java clients

…appy/xerial

Replace abandoned eapache/go-xerial-snappy with klauspost/compress/snappy/xerial
which is already used for other compression codecs (gzip, zstd).

- Update Encode() API call to match new signature (Encode(dst, src []byte))
- Update test expectations in record_test.go for new xerial format
- Remove eapache/go-xerial-snappy dependency from go.mod

All unit and functional tests passing.

Signed-off-by: Edoardo Comar <[email protected]>
@edoardocomar edoardocomar force-pushed the ec/snappy branch 2 times, most recently from 23a26dc to 4d45d42 Compare January 10, 2026 01:19
…rip compatibility

Add two functional tests to verify snappy compression compatibility:
- TestJavaProducerSnappyRoundTrip: Java console producer -> Sarama consumer
- TestSaramaProducerToJavaConsumerSnappy: Sarama producer -> Java console consumer

Signed-off-by: Edoardo Comar <[email protected]>
@dnwe dnwe added the chore label Jan 11, 2026
Copy link
Copy Markdown
Collaborator

@dnwe dnwe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I added a small extra commit to re-use some of the existing helpers but otherwise looks good

@dnwe dnwe merged commit a014b3e into IBM:main Jan 11, 2026
17 checks passed
@edoardocomar edoardocomar deleted the ec/snappy branch January 11, 2026 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants