Skip calling IOReadCloser() method on zstd decoder for getReader()

This commit is contained in:
Seednode 2024-01-07 22:28:03 -06:00
parent de94c5eb49
commit 09bff1ed18
2 changed files with 2 additions and 4 deletions

View File

@ -110,9 +110,7 @@ func getReader(format string, file io.Reader) (io.Reader, error) {
case "zlib": case "zlib":
return zlib.NewReader(file) return zlib.NewReader(file)
case "zstd": case "zstd":
decoder, err := zstd.NewReader(file) return zstd.NewReader(file)
return decoder.IOReadCloser(), err
} }
return io.NopCloser(file), ErrInvalidCompression return io.NopCloser(file), ErrInvalidCompression

View File

@ -17,7 +17,7 @@ import (
const ( const (
AllowedCharacters string = `^[A-z0-9.\-_]+$` AllowedCharacters string = `^[A-z0-9.\-_]+$`
ReleaseVersion string = "4.0.2" ReleaseVersion string = "4.0.3"
) )
var ( var (