feat(archive): enable multithreaded zstd compression
This commit is contained in:
@@ -28,7 +28,7 @@ def archive_repo(source: Path, target_dir: Path, dry_run: bool) -> Path:
|
||||
return archive_path
|
||||
|
||||
with open(archive_path, "wb") as f:
|
||||
cctx = zstandard.ZstdCompressor(level=20)
|
||||
cctx = zstandard.ZstdCompressor(level=20, threads=-1)
|
||||
with cctx.stream_writer(f) as compressor:
|
||||
with tarfile.open(fileobj=compressor, mode="w|") as tar:
|
||||
tar.add(source, arcname=source.name)
|
||||
|
||||
Reference in New Issue
Block a user