Skip to content

policy: replace golang/snappy with klauspost/compress/snappy#3686

Open
thaJeztah wants to merge 1 commit intodocker:masterfrom
thaJeztah:even_snappier
Open

policy: replace golang/snappy with klauspost/compress/snappy#3686
thaJeztah wants to merge 1 commit intodocker:masterfrom
thaJeztah:even_snappier

Conversation

@thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Mar 3, 2026

The golang/snappy implementation has been archived and is no longer maintained. The github.com/klauspost/compress module provides a maintained implementation, which is a drop-in replacement; https://pkg.go.dev/github.com/klauspost/compress/snappy

This is a drop-in replacement for github.com/golang/snappy.

Given that we're already depending on that module, we can switch to the maintained implementation.

@thaJeztah
Copy link
Member Author

This is a bit unfortunate:

Screenshot 2026-03-03 at 16 50 19

But maybe not a big concern (at least, we know the klauspost/compress module is of good quality, and well maintained)

Comment on lines +45 to +48
// Decode handles the Snappy block format, not the Snappy stream format.
func Decode(dst, src []byte) ([]byte, error) {
return s2.Decode(dst, src)
}
Copy link
Member Author

Choose a reason for hiding this comment

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

As it's a straight wrapper, we COULD choose to skip the intermediate package (and alias s2 as snappy for clarity), but not sure if there'd ever be any compatibility wrappers added here of course 🤔

The golang/snappy implementation has been archived and is no longer
maintained. The github.com/klauspost/compress module provides
a maintained implementation, which is a drop-in replacement;
https://pkg.go.dev/github.com/klauspost/compress/snappy

> This is a drop-in replacement for github.com/golang/snappy.

Given that we're already depending on that module, we can switch
to the maintained implementation.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah
Copy link
Member Author

rebased, after the other PR was merged 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant