Currently we are forced to use gunzip to make tar.gz archives.
I'd like to use zstd because it's just better: notably, it's much faster. This can make a big difference in CI when syncing down packages.
I think if we are able to give flags like
--compressor=zstd
--compressor-extension=zst
The changes to code ought to be fairly minimal:
- When
compressor is set, pass -I <compressor> to tar.
- Instead of
tar.gz, use tar.<compressor-extension>. gz if not set. Don't pass -z to tar unless we're using gunzip.
Maybe instead of --compressor, multiple --tar-flag are much more flexible.
This approach relies on the compressor binary being installed and doesn't add any new dependency to cabal-cache itself.
Apparently tar itself has some zstd support via the --zstd flag but at least on my system, but it's probably a much newer flag than just using -I.
Currently we are forced to use
gunzipto maketar.gzarchives.I'd like to use
zstdbecause it's just better: notably, it's much faster. This can make a big difference in CI when syncing down packages.I think if we are able to give flags like
--compressor=zstd--compressor-extension=zstThe changes to code ought to be fairly minimal:
compressoris set, pass-I <compressor>totar.tar.gz, usetar.<compressor-extension>.gzif not set. Don't pass-ztotarunless we're using gunzip.Maybe instead of
--compressor, multiple--tar-flagare much more flexible.This approach relies on the compressor binary being installed and doesn't add any new dependency to
cabal-cacheitself.Apparently
taritself has somezstdsupport via the--zstdflag but at least on my system, but it's probably a much newer flag than just using-I.