Skip to content

Drop support for github.com/DataDog/zstd_0 - #505

Draft
jszwedko wants to merge 2 commits into
masterfrom
jszwedko/remove-zstd_0
Draft

Drop support for github.com/DataDog/zstd_0#505
jszwedko wants to merge 2 commits into
masterfrom
jszwedko/remove-zstd_0

Conversation

@jszwedko

@jszwedko jszwedko commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

The zstd_0 module is abandoned upstream and carries known memory safety vulnerabilities, so this removes it as a dependency along with the MessageEncodingZstdPB wire encoding it backed. Encoding value 2 is now rejected as an unknown encoding on both encode and decode, rather than being kept around as a dead-but-callable constant; zstd 1.x and the pure-Go klauspost/compress/zstd path remain fully supported and should offer strictly better performance in its place.

This is a breaking API change (removes the exported MessageEncodingZstdPB constant and changes behavior for encoding value 2). Once this is reviewed and approved, we'll bump the module to v6 before merging/releasing.

Test plan

  • Existing message/compress tests updated: encoding value 2 is now exercised as an "unknown message encoding" case (previously round-tripped through zstd_0) for both the cgo and no-cgo builds
  • Removed the now-unused zstd_0 backward-compatibility decode test and its fixture file

jszwedko and others added 2 commits July 22, 2026 14:29
zstd_0 is abandoned and has known memory safety vulnerabilities. The
MessageEncodingZstdPB wire encoding (value 2) is now treated as
unsupported on both encode and decode, matching the behavior already
used for the no-cgo build. zstd 1.x (MessageEncodingZstd1xPB) and the
klauspost pure-Go implementation remain fully supported and should
have strictly better performance anyway.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This is a breaking change: encoding 2 (formerly MessageEncodingZstdPB,
backed by zstd_0) is now rejected as an unknown encoding on both encode
and decode, instead of exposing a removed-but-still-referenceable
constant. Callers still on this encoding must migrate to
MessageEncodingZstd1xPB or MessageEncodingZstdPBxNoCgo. Given the
breaking nature, this should ship as a v6 major version bump once
reviewed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.

1 participant