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.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
revert temporary changes that disabled compression
Chris Lu332f5ad3a823
diff --git a/weed/storage/needle/needle_parse_upload.go b/weed/storage/needle/needle_parse_upload.goindex 0888c6b7a9..fe6b7d7404 100644--- a/weed/storage/needle/needle_parse_upload.go+++ b/weed/storage/needle/needle_parse_upload.go@@ -75,16 +75,14 @@ func ParseUpload(r *http.Request, sizeLimit int64, bytesBuffer *bytes.Buffer) (pif mimeType == "application/octet-stream" {mimeType = ""}- if false {- if shouldBeCompressed, iAmSure := util.IsCompressableFileType(ext, mimeType); mimeType == "" && !iAmSure || shouldBeCompressed && iAmSure {- // println("ext", ext, "iAmSure", iAmSure, "shouldBeCompressed", shouldBeCompressed, "mimeType", pu.MimeType)- if compressedData, err := util.GzipData(pu.Data); err == nil {- if len(compressedData)*10 < len(pu.Data)*9 {- pu.Data = compressedData- pu.IsGzipped = true- }- // println("gzipped data size", len(compressedData))+ if shouldBeCompressed, iAmSure := util.IsCompressableFileType(ext, mimeType); mimeType == "" && !iAmSure || shouldBeCompressed && iAmSure {+ // println("ext", ext, "iAmSure", iAmSure, "shouldBeCompressed", shouldBeCompressed, "mimeType", pu.MimeType)+ if compressedData, err := util.GzipData(pu.Data); err == nil {+ if len(compressedData)*10 < len(pu.Data)*9 {+ pu.Data = compressedData+ pu.IsGzipped = true}+ // println("gzipped data size", len(compressedData))}}}