Skip to content

Feature/compress zstd#3946

Open
patrickdk77 wants to merge 3 commits intozalando:masterfrom
patrickdk77:feature/compress-zstd
Open

Feature/compress zstd#3946
patrickdk77 wants to merge 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.

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.

}

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

}

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

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.

3 participants