macostarlz4zstd

How to add zstd and lz4 algorithm to tar on MacOS?


So my tar version on MacOS doesn't seem to support the zstd or lz4 algorithms, and I am unsure how to update tar or add support for it. My Ubuntu's tar version seems to have support for zstd.


Solution

  • Here is how you can use zstd with older versions of tar.

    tar cvf - "directory" | zstd > "archive.tar.zstd"
    

    You also might want to check out gnu-tar from homebrew.