$linuxjunkies
>

zstdmt(1)

Multi-threaded Zstandard compression utility for parallel compression and decompression of files.

UbuntuDebianFedoraArch

Synopsis

zstdmt [OPTION]... [FILE]...

Description

zstdmt is a multi-threaded variant of the Zstandard (zstd) compression tool that leverages multiple CPU cores for faster compression and decompression. It maintains compatibility with the standard zstd format while providing improved performance on multi-core systems by automatically parallelizing compression work across available threads.

The tool processes files by splitting them into independent blocks that can be compressed or decompressed in parallel, making it ideal for batch processing, large file compression, and systems with multiple processor cores.

Common options

FlagWhat it does
-#Compression level (1-22, default 3); higher = better compression but slower
-d, --decompressDecompress files instead of compressing
-o FILEWrite output to specified file instead of stdout or default name
-f, --forceOverwrite output files without prompting
-k, --keepKeep (don't delete) input files after compression/decompression
-T#, --threads=#Use # parallel threads (0 = auto-detect based on CPU cores)
-c, --stdoutWrite to stdout, leaving input files unchanged
-v, --verboseVerbose output; show compression statistics and progress
-q, --quietSuppress informational messages and warnings
--ultraEnable ultra compression levels (20-22) for maximum compression
-t, --testTest file integrity without decompressing to disk
-rRecursively compress/decompress all files in directories

Examples

Compress largefile.bin with high compression level (19) using multiple threads, outputs largefile.bin.zst

zstdmt -19 largefile.bin

Decompress archive.zst and write output to recovered.bin using parallel decompression

zstdmt -d archive.zst -o recovered.bin

Compress all .log files with 8 threads at level 3 compression into combined.zst

zstdmt -T8 -3 *.log -o combined.zst

Compress to stdout and pipe over SSH for remote backup with parallel compression

zstdmt -c -19 source.tar | ssh user@host 'cat > backup.tar.zst'

Recursively compress all files in /var/log with auto-threaded performance, keeping originals

zstdmt -r -k -T0 /var/log

Decompress multiple .zst files with verbose output showing statistics for each

zstdmt -d -v *.zst

Maximum compression (level 22) using 4 threads for critical database backup

zstdmt -T4 --ultra -22 critical-backup.sql

Test integrity of compressed archive without decompressing to disk

zstdmt -t largearchive.zst && echo 'Archive is valid'

Related commands