Skip to content

Commit b818a65

Browse files
authored
Fix: Unable to return the correct type for Zip compression (#1013)
1 parent 6437e52 commit b818a65

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

pkg/compressor/zip_compress.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,5 @@ func (z Zip) Decompress(data []byte) ([]byte, error) {
5555
}
5656

5757
func (z Zip) GetCompressorType() CompressorType {
58-
return CompressorZstd
58+
return CompressorZip
5959
}

pkg/compressor/zip_compress_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ func TestZipCompress(t *testing.T) {
3232
assert.NoError(t, err)
3333
t.Logf("compress res: %v", string(compressRes))
3434

35+
assert.EqualValues(t, CompressorZip, g.GetCompressorType())
36+
3537
decompressRes, err := g.Decompress(compressRes)
3638
assert.NoError(t, err)
3739
t.Logf("decompress res: %v", string(decompressRes))

0 commit comments

Comments
 (0)