You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
the suggestions to implement of a "-z <file extensions>" and a "-Z" flags #3205
What is your current rclone version (output from rclone version)?
rclone v1.47.0
os/arch: linux/amd64
go version: go1.12.4
What problem are you are trying to solve?
I trying to compress all files or some files filtered by their extensions during uploading it to gcs, s3, and other providers buckets which allow us to set the metadata 'Content-Encoding: gzip' for compressed files
How do you think rclone should be changed to solve that?
it would be great to implement a -z <file extensions> and -Z flags to solve managing of compressed files and allowing to set 'Content-Encoding: gzip' for such uploaded files on remote
that implemented in gsutil as flags -Z and -z and well documented here.
In case anybody wants to pick it up, just linking to #59, where there is an explanation for how to implement a generic "add headers" feature. Not sure if this would be much different, though.
@pol1000000 I've checked and the issue/feature is not solved.
Would you mind reopening to allow others to pick it up? If you're no longer interested, you can unsubscribe from notifications.
Thank you.
Applies gzip content encoding to any file upload whose extension matches the input extension list. This is useful when uploading files with compressible content such as .js, .css, or .html files. This saves network bandwidth and space in Cloud Storage.
When you specify the --gzip-local option, the data from files is compressed before it is uploaded, but the original files are left uncompressed on the local disk. The uploaded objects retain the Content-Type and name of the original files. However, the Content-Encoding metadata is set to gzip and the Cache-Control metadata set to no-transform. The data remains compressed on Cloud Storage servers and will not be decompressed on download by gcloud storage because of the no-transform field.
Since the local gzip option compresses data prior to upload, it is not subject to the same compression buffer bottleneck of the in-flight gzip option.
--gzip-local-all, -Z
Applies gzip content encoding to file uploads. This option works like the --gzip-local option described above, but it applies to all uploaded files, regardless of extension.
CAUTION: If some of the source files don't compress well, such as binary data, using this option may result in files taking up more space in the cloud than they would if left uncompressed.
Activity
larinam commentedon Sep 19, 2019
Could you speed up the implementation, please?
ncw commentedon Sep 19, 2019
Would anyone like to help with this?
I think it probably applies to all the bucket based remotes.
pataquets commentedon Sep 23, 2019
In case anybody wants to pick it up, just linking to #59, where there is an explanation for how to implement a generic "add headers" feature. Not sure if this would be much different, though.
pgalbavy commentedon Jun 26, 2020
As per https://forum.rclone.org/t/gzip-for-google-cloud-storage/17430 I've started thinking about this, but my Golang is only at starter level and my knowledge of rclone code layout is minimal.
pataquets commentedon Nov 4, 2020
@pol1000000 I've checked and the issue/feature is not solved.
Would you mind reopening to allow others to pick it up? If you're no longer interested, you can unsubscribe from notifications.
Thank you.
acme commentedon Apr 8, 2026
gsutilis deprecated. The modern equivalent isgcloud storage cp: https://docs.cloud.google.com/sdk/gcloud/reference/storage/cp