• Gamma
      link
      English
      1310 months ago

      zstd or leave

        • @[email protected]
          link
          fedilink
          1
          edit-2
          10 months ago

          Well when using zstd, you tar first, something like tar -I zstd -cf my_tar.tar.zst my_files/*. You almost never call zstd directly and always use some kind of wrapper.

          • @[email protected]
            link
            fedilink
            710 months ago

            Sure, you can tar first. That has various issues though, for example if you just want to extract one file in the middle of the archive, it still needs to decompress everything up to that point. Something like 7-Zip is more sophisticated in terms of how it indexes files in the archive, so I’m looking forward to them adding zstd support.

            FWIW most of my uses of zstd don’t involve tar, but it’s in things like Borgbackup, database systems, etc.

      • @derpgon
        link
        410 months ago

        I’ll gunzip you to oblivion!

        • Gamma
          link
          English
          11
          edit-2
          10 months ago

          Thought I’d check on the Linux source tree tar. zstd -19 vs lzma -9:

          ❯ ls -lh
          total 1,6G
          -rw-r--r-- 1 pmo pmo 1,4G Sep 13 22:16 linux-6.6-rc1.tar
          -rw-r--r-- 1 pmo pmo 128M Sep 13 22:16 linux-6.6-rc1.tar.lzma
          -rw-r--r-- 1 pmo pmo 138M Sep 13 22:16 linux-6.6-rc1.tar.zst
          

          About +8% compared to lzma. Decompression time though:

          zstd -d -k -T0 *.zst  0,68s user 0,46s system 162% cpu 0,700 total
          lzma -d -k -T0 *.lzma  4,75s user 0,51s system 99% cpu 5,274 total
          

          Yeah, I’m going with zstd all the way.