[Bug 14338] New: ZSTD support

samba-bugs at samba.org samba-bugs at samba.org
Mon Apr 6 10:36:15 UTC 2020


            Bug ID: 14338
           Summary: ZSTD support
           Product: rsync
           Version: 3.1.3
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P5
         Component: core
          Assignee: wayne at opencoder.net
          Reporter: Rsync at ml.breakpoint.cc
        QA Contact: rsync-qa at samba.org

Created attachment 15898
  --> https://bugzilla.samba.org/attachment.cgi?id=15898&action=edit
zstd support

zstd compression was announced as "good compression with high
throughput" so I gave it a try. With zlib, on high speed links the CPU
is usually the bottle neck. With zstd I'm able to fill a 200Mbit link :)

zstd detection happens automatically via pkg-config. No zstd header means
no error about missing zstd. So that should be okay. However, pkg-config
is now kind of required…

I duplicated the zlib code and replaced it with zstd hooks once I
understood what was going on. I made a few local tests with and without
tokens and it seems to work. The compression can be selected with `-Z'
option. By default `0' is used as the compression level which is a
special default (it currently maps to 3). The compression level can be
specified by the same option as for zlib.
The compressor feeds data into zstd and starts sending data once the
outgoing buffer is full or when a flush is requested. That flush will
close the current compression block and create a new one for the
following transfer (saving the internal compression / history state).
The decompressor allocates space for two blocks. Should one block
contain more data, then it will loop more often.

You are receiving this mail because:
You are the QA Contact for the bug.

More information about the rsync mailing list