Skip to content

compress: the default level hangs zstd mode and leaves gzip mode uncompressed (v1.75.2) #10227

Closed

Description

@odysseus0-agents

Before you start

  • I have searched the forum and the existing issues for this problem.
  • I have tested with the latest stable release (v1.75.2) and can still reproduce the problem.
  • This is a reproducible bug, not a usage question.

Associated forum post URL

Possibly related, unanswered and closed: https://forum.rclone.org/t/the-compression-option-not-works-at-v1-72-1/53223 (v1.72.1, a .gz with no compressed data).

What is the problem you are having with rclone?

With the compress backend's default level (-1):

  1. zstd mode never finishes uploading a compressible file: rclone stops after "Need to transfer - File not found at Destination" and hangs until killed. Every compressible file I tried hangs, from 1 KB up; incompressible data (random bytes) uploads fine.
  2. gzip mode uploads, but stores the file uncompressed: a 51,192-byte JSON-lines file becomes a 51,222-byte .gz.

Setting the level explicitly fixes both: zstd at level 2 stores the same file in 848 bytes, gzip at level 5 in 1,013 bytes. The help lists -1 as gzip's default ("equivalent to level 5") and zstd's levels as 0 to 4.

Minimal reproduction, local disk only, no config file:

mkdir -p /tmp/rcz
for i in $(seq 1 300); do echo "{\"type\":\"user\",\"text\":\"line $i the quick brown fox jumps over the lazy dog the quick brown fox jumps over the lazy dog\"}"; done > /tmp/rcz/f

# zstd, default level: hangs
RCLONE_CONFIG_Z_TYPE=compress RCLONE_CONFIG_Z_REMOTE=/tmp/rcz/a RCLONE_CONFIG_Z_MODE=zstd \
  rclone copyto -vv /tmp/rcz/f z:f

# zstd, level 2: finishes, compressed
RCLONE_CONFIG_Z_TYPE=compress RCLONE_CONFIG_Z_REMOTE=/tmp/rcz/b RCLONE_CONFIG_Z_MODE=zstd RCLONE_CONFIG_Z_LEVEL=2 \
  rclone copyto /tmp/rcz/f z:f && ls -l /tmp/rcz/b

# gzip, default level: finishes, but the .gz is as large as the input
RCLONE_CONFIG_Z_TYPE=compress RCLONE_CONFIG_Z_REMOTE=/tmp/rcz/c \
  rclone copyto /tmp/rcz/f z:f && ls -l /tmp/rcz/c

rclone version

rclone v1.75.2
- os/version: darwin 27.0.1 (64 bit)
- os/kernel: 27.0.0 (arm64)
- os/type: darwin
- os/arch: arm64 (ARMv8 compatible)
- go/version: go1.26.10
- go/linking: dynamic
- go/tags: cmount noselfupdate

(the nixpkgs build)

Operating system

macOS

Which cloud storage system are you using?

compress over local disk (first seen as compress over crypt over S3 on Cloudflare R2)

Output of rclone config redacted

No config file; the remote comes from the environment variables above.

The command you were trying to run

rclone copyto -vv /tmp/rcz/f z:f (zstd mode, default level)

A log from the command with the -vv flag

DEBUG : rclone: Version "v1.75.2" starting with parameters ["rclone" "copyto" "-vv" "/tmp/rcz/f" "z:f"]
DEBUG : Creating backend with remote "/tmp/rcz/f"
NOTICE: Config file "~/.config/rclone/rclone.conf" not found - using defaults
DEBUG : Creating backend with remote "z:"
DEBUG : Setting type=XXX for "z" from environment variable RCLONE_CONFIG_Z_TYPE
DEBUG : Setting remote="/tmp/rcz/a" for "z" from environment variable RCLONE_CONFIG_Z_REMOTE
DEBUG : Setting mode="zstd" for "z" from environment variable RCLONE_CONFIG_Z_MODE
DEBUG : f: Need to transfer - File not found at Destination
(no further output; killed after 6 s)
INFO  : Signal received: terminated

Anything else?

This report was prepared with an AI coding assistant (Claude Code); every command above was run and its output is as shown.

Activity

  1. akasakariko commented on Nov 1, 2026

    @akasakariko
    Contributor

    I'd like to work on this

  2. diogovalada commented on Nov 5, 2026

    @diogovalada

    Just had this issue today

  3. ncw commented on Nov 11, 2026

    @ncw
    Member

    I've merged @akasakariko fix for this to master now which means it will be in the latest beta in 15-30 minutes and released in v1.76.1

  4. added a commit that references this issue on Nov 11, 2026
    d55dd62
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions