Skip to content

Commit

Permalink
zstd: correctly ignore WithEncoderPadding(1) (#806)
Browse files Browse the repository at this point in the history
  • Loading branch information
ianlancetaylor authored Apr 22, 2023
1 parent ed6feff commit 7a331e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zstd/encoder_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func WithEncoderPadding(n int) EOption {
}
// No need to waste our time.
if n == 1 {
o.pad = 0
n = 0
}
if n > 1<<30 {
return fmt.Errorf("padding must less than 1GB (1<<30 bytes) ")
Expand Down

0 comments on commit 7a331e1

Please sign in to comment.