Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

adjust uncompress data

Chris Lua735fd767cbd
diff --git a/weed/util/compression.go b/weed/util/compression.go
index f6315ebc25..ff5e3ad3ff 100644
--- a/weed/util/compression.go
+++ b/weed/util/compression.go
@@ -4,6 +4,7 @@ import (
"bytes"
"compress/flate"
"compress/gzip"
+ "fmt"
"io/ioutil"
"strings"
@@ -29,18 +30,7 @@ func UnCompressData(input []byte) ([]byte, error) {
if IsGzippedContent(input) {
return ungzipData(input)
}
-
-}
-
-func ungzipData(input []byte) ([]byte, error) {
- buf := bytes.NewBuffer(input)
- r, _ := gzip.NewReader(buf)
- defer r.Close()
- output, err := ioutil.ReadAll(r)
- if err != nil {
- glog.V(2).Infoln("error uncompressing data:", err)
- }
- return output, err
+ return nil, fmt.Errorf("unsupported compression")
}
func ungzipData(input []byte) ([]byte, error) {