Question about zstd? compression

There is an option -zstd-level in the duplicate init. But what does it do?

From what I learned from reading around the internet is that duplicacy uses LZ4 to compress chunks and there is no way to turn it off. So what is the -zstd-level option for? Does duplicacy compress with zstd + lz4 then, or uses zstd instead of lz4, or something else?

Reading around the internet? Why not read on the source? Zstd compression implemented

It would make no sense to apply two different compression algorithms on data. LZ4 is the default compression but you can use zstd when you initialize the repository and if you do, that’s when -zstd-level comes into play.

You don’t need to initialize repository with zstd compression flag to use it. backup command also supports specifying compression.

While this sounds like a reasonable conclusion to make, if you already have a lz4 storage and lack the extra disk space to convert to a separate zstd storage, making such a transition is possible because existing chunks won’t have to be recompressed, only incrementals use the new format.

Those older chunks can be left to gradually get pruned over time.

I can also envisage a scenario where a low compute device (e.g. RPi) might want to use fastest and everything else default or best or whatever.

1 Like

The use case you described only compresses the data once. Either lz4 originally or zstd for new chunks. The OP was asking if lz4 and zstd compression was performed on chunks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.