|
|
@ -100,12 +100,13 @@ func newProgressReader(rc io.ReadCloser, compType CompressionType) (*progressRea |
|
|
|
case noneType: |
|
|
|
case noneType: |
|
|
|
r = scannedReader |
|
|
|
r = scannedReader |
|
|
|
case gzipType: |
|
|
|
case gzipType: |
|
|
|
if r, err = gzip.NewReader(scannedReader); err != nil { |
|
|
|
r, err = gzip.NewReader(scannedReader) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
if errors.Is(err, gzip.ErrHeader) || errors.Is(err, gzip.ErrChecksum) { |
|
|
|
if errors.Is(err, gzip.ErrHeader) || errors.Is(err, gzip.ErrChecksum) { |
|
|
|
return nil, errInvalidGZIPCompressionFormat(err) |
|
|
|
return nil, errInvalidGZIPCompressionFormat(err) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return nil, errTruncatedInput(err) |
|
|
|
} |
|
|
|
} |
|
|
|
return nil, errTruncatedInput(err) |
|
|
|
|
|
|
|
case bzip2Type: |
|
|
|
case bzip2Type: |
|
|
|
r = bzip2.NewReader(scannedReader) |
|
|
|
r = bzip2.NewReader(scannedReader) |
|
|
|
default: |
|
|
|
default: |
|
|
|