14 lines
317 B
Bash
Executable File
14 lines
317 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
if [[ $# -eq 0 ]]; then
|
|
echo "Usage: compress-7zst <7z args...>"
|
|
exit 1
|
|
fi
|
|
|
|
level="${level:-15}"
|
|
cores=$(python3 -c "import os; print(os.cpu_count())")
|
|
|
|
echo "Starting ZSTD compression with $cores cores and level $level"
|
|
exec 7z a -m0=zstd -mx"$level" -mmt"$cores" "$@"
|