Skip to content

Feature/compress zstd#3946

Merged
szuecs merged 3 commits intozalando:masterfrom
patrickdk77:feature/compress-zstd
Apr 7, 2026
Merged

Feature/compress zstd#3946
szuecs merged 3 commits intozalando:masterfrom
patrickdk77:feature/compress-zstd

Conversation

@patrickdk77
Copy link
Copy Markdown
Contributor

Adds zstd support to compress and decompress filters without adding extra dependencies
Savings cpu processing time vs gzip, atleast almost all of my clients have zstd support

Signed-off-by: patrickdk <patrickdk@patrickdk.com>
Signed-off-by: patrickdk <patrickdk@patrickdk.com>
@zalando-robot
Copy link
Copy Markdown

Cannot start a pipeline due to:

No accountable user for this pipeline: no Zalando employee associated to this GitHub username

Click on pipeline status check Details link below for more information.

Comment thread filters/builtin/decompress.go Outdated
case "br":
return new(brotliWrapper)
case "zstd":
return new(zstdWrapper)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If you initialize here the decoder then we don't need the runtime nil checks anymore.

Comment thread filters/builtin/decompress.go Outdated
}

func (w *zstdWrapper) Reset(original io.Reader) error {
if w.Decoder == nil {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

please drop and init correctly in newDecoder

Comment thread filters/builtin/decompress.go Outdated
}

func (w *zstdWrapper) Close() error {
if w.Decoder != nil {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

please drop and init correctly in newDecoder

Signed-off-by: patrickdk <patrickdk@patrickdk.com>
@zalando-robot
Copy link
Copy Markdown

Cannot start a pipeline due to:

No accountable user for this pipeline: no Zalando employee associated to this GitHub username

Click on pipeline status check Details link below for more information.

@patrickdk77
Copy link
Copy Markdown
Contributor Author

Believe this addresses the request, my lack of go class understanding is showing

@szuecs szuecs requested a review from MustafaSaber April 7, 2026 11:35
@szuecs
Copy link
Copy Markdown
Member

szuecs commented Apr 7, 2026

Thanks lgtm

@szuecs szuecs requested a review from greeshma1196 April 7, 2026 12:14
@ponimas
Copy link
Copy Markdown
Member

ponimas commented Apr 7, 2026

👍

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.

4 participants