4 ms·
zstd has higher level modes. Default is -3. I saw a good tradeoff between compression speed and ratio up to -9 or so. From -20 to -22 it will use much more memo
by a_t48 3mo ago
zstd has higher level modes. Default is -3. I saw a good tradeoff between compression speed and ratio up to -9 or so. From -20 to -22 it will use much more memory and IIRC can have downstream effects on decompression speed. I'm using -9 for my container registry and plan to recompress at a higher level for commonly accessed base layers, as well as give customers a button that lets them pay a bit more to do it themselves.
- loeg 3mo agoTo be a little pedantic, the usual zstd levels are positive integers (1-22 default 3). The negative integers denote "fast" modes with worse compression (there are only a few of these).
- a_t48 3mo agoWhoops! You're right, and it's too late to edit.
- edflsafoiewq 3mo agoI think those are CLI options, not negative signs. Ie. you call zstd -3 for compression level 3.
- chickenbig 3mo agoEven compression level 1 or 2 is pretty good. I once used https://github.com/google/riegeli https://github.com/google/riegeli and a low zstd compression level to store large quantities of protobuf data in an efficient manner (in terms of CPU, RAM and streaming to disk). Shame Riegeli is not well known, not well documented and does not have many tests.