Пакет: zstd

Версия
1.5.7
Релиз
1.niceos5
Архитектура
x86_64
Хэш GOST
012bdf18bef4abc0cc0c941f13636fe95c3de4cc57667331e2f3267a46c51031
Хэш MD5
372bb39c19f2ccc1654b00253360302f
Хэш SHA256
829b2f9a4c229369621bf9c57284882c037cc60bfb5796f89922a439cf03ba17
Лицензия
BSD и GPLv2
Дата сборки
12 мая 2025 г.
Размер
1,253 ГиБ
Совместимые ОС
rpm файл:
zstd-1.5.7-1.niceos5.x86_64.rpm
Подпакеты
Имя Краткое описание
zstd-libs Описание отсутствует
zstd-devel Описание отсутствует
lib32-zstd 32-битные библиотеки для zstd
Зависимости
Имя Тип Версия
/bin/sh runtime -
libc.so.6()(64bit) runtime -
libc.so.6(GLIBC_2.14)(64bit) runtime -
libc.so.6(GLIBC_2.17)(64bit) runtime -
libc.so.6(GLIBC_2.2.5)(64bit) runtime -
libc.so.6(GLIBC_2.3.2)(64bit) runtime -
libc.so.6(GLIBC_2.33)(64bit) runtime -
libc.so.6(GLIBC_2.34)(64bit) runtime -
libc.so.6(GLIBC_2.4)(64bit) runtime -
libc.so.6(GLIBC_2.6)(64bit) runtime -
libc.so.6(GLIBC_2.8)(64bit) runtime -
liblz4.so.1()(64bit) runtime -
liblzma.so.5()(64bit) runtime -
liblzma.so.5(XZ_5.0)(64bit) runtime -
libz.so.1()(64bit) runtime -
rtld(GNU_HASH) runtime -
zstd-libs runtime -
Граф зависимостей
История изменений
Дата Автор Сообщение
31 мар. 2025 г. Stanislav Belikov <sbelikov@ncsgp.ru> Первая сборка для zstd
Файлы пакета
      • /usr/bin/unzstd 4 Б
      • /usr/bin/zstd 1,237 МиБ
      • /usr/bin/zstdcat 4 Б
      • /usr/bin/zstdgrep 3,778 КиБ
      • /usr/bin/zstdless 197 Б
      • /usr/bin/zstdmt 4 Б
          • /usr/share/man/man1/unzstd.1.gz 9 Б
          • /usr/share/man/man1/zstd.1.gz 11,285 КиБ
          • /usr/share/man/man1/zstdcat.1.gz 9 Б
          • /usr/share/man/man1/zstdgrep.1.gz 594 Б
          • /usr/share/man/man1/zstdless.1.gz 259 Б
Документация (man-страницы)

ZSTD(1)				 Пользовательские команды			       ZSTD(1)



NAME
       zstd  -	zstd,  zstdmt,	unzstd,	 zstdcat - Сжатие или распаковка файлов .zst

SYNOPSIS
       allbox; zstd [OPTIONS] [-   INPUT-FILE] [-o OUTPUT-FILE]

       zstdmt is equivalent to zstd -T0

       unzstd is equivalent to zstd -d

       zstdcat is equivalent to zstd -dcf

DESCRIPTION
       zstd - это быстрый алгоритм без потерь сжатия и инструмент для сжатия данных, с синтаксисом командной строки, похожим на gzip(1) и xz(1). Он основан на семействе LZ77, с дополнительными этапами энтропии FSE & huff0. zstd предлагает высокую настройку скорости сжатия, от быстрых режимов более 200 МБ/с на ядро до сильных режимов с отличными коэффициентами сжатия. Он также имеет очень быстрый декодер, со скоростью более 500 МБ/с на ядро, которая остается примерно стабильной во всех настройках сжатия.

       Синтаксис командной строки zstd в целом похож на gzip, но имеет следующие отличия:

       •   Исходные файлы сохраняются по умолчанию. Их можно удалить автоматически, используя команду --rm.

       •   При сжатии одного файла zstd отображает уведомления о прогрессе и сводку результатов по умолчанию. Используйте -q, чтобы отключить их.

       •   zstd отображает краткую справочную страницу, если в командной строке ошибка. Используйте -q, чтобы отключить это.

       •   zstd не принимает ввод из консоли, хотя принимает stdin, если это не консоль.

       •   zstd не хранит имя файла или атрибуты входных данных, только их содержимое.



       zstd обрабатывает каждый файл в соответствии с выбранным режимом операции. Если файлы не указаны или указан файл -, zstd читает из стандартного ввода и записывает обработанные данные в стандартный вывод. zstd отказывается записывать сжатые данные в стандартный вывод, если это терминал: он отобразит сообщение об ошибке и пропустит файл. Аналогично, zstd отказывается читать сжатые данные из стандартного ввода, если это терминал.

       Если не указан --stdout или -o, файлы записываются в новый файл, имя которого выводится из имени исходного файла:

       •   При сжатии к имени исходного файла добавляется суффикс .zst для получения имени целевого файла.

       •   При распаковке суффикс .zst удаляется из имени исходного файла для получения имени целевого файла



   Конкатенация с файлами .zst
       Возможна конкатенация нескольких файлов .zst. zstd распакует такой объединенный файл, как если бы это был один файл .zst.

OPTIONS
   Суффиксы целых чисел и специальные значения
       В большинстве мест, где ожидается аргумент целого числа, поддерживается необязательный суффикс для удобного указания больших целых чисел. Между целым числом и суффиксом не должно быть пробелов.

       KiB    Умножает целое число на 1 024 (2^10). Ki, K и KB принимаются как синонимы для KiB.

       MiB    Умножает целое число на 1 048 576 (2^20). Mi, M и MB принимаются как синонимы для MiB.

   Режим операции
       Если указаны несколько опций режима операции, последняя вступает в силу.

       -z, --compress
	      Сжатие. Это режим операции по умолчанию, когда ни одна опция режима операции не указана и другой режим не подразумевается из имени команды (например, unzstd подразумевает --decompress).

       -d, --decompress, --uncompress
	      Распаковка.

       -t, --test
	      Проверка целостности сжатых файлов. Эта опция эквивалентна --decompress --stdout > /dev/null, распакованные данные отбрасываются и проверяются на ошибки контрольной суммой. Файлы не создаются или не удаляются.

       -b#    Тестирование производительности файла(ов) с использованием уровня сжатия #. См. BENCHMARK ниже для описания этой операции.

       --train FILES
	      Использовать FILES в качестве набора для обучения для создания словаря. В наборе должно быть много небольших файлов (> 100). См. DICTIONARY BUILDER ниже для описания этой операции.

       -l, --list
	      Отобразить информацию, связанную с сжатым файлом zstd, такую как размер, коэффициент и контрольную сумму. Некоторые из этих полей могут быть недоступны. Вывод этой команды можно расширить с помощью модификатора -v.

   Модификаторы операции
       •   -#: выбирает уровень сжатия # [1-19] (по умолчанию: 3). Более высокие уровни сжатия обычно обеспечивают лучший коэффициент сжатия за счет скорости и памяти. Примерное правило: скорость сжатия ожидается, что уменьшится вдвое каждые 2 уровня. Технически, каждый уровень сопоставляется с набором продвинутых параметров (которые также можно изменить индивидуально, см. ниже). Поскольку поведение компрессора сильно зависит от сжимаемого содержимого, нет гарантии плавного перехода от одного уровня к другому.

       •   --ultra: разблокирует высокие уровни сжатия 20+ (максимум 22), используя гораздо больше памяти. Обратите внимание, что для распаковки также потребуется больше памяти при использовании этих уровней.

       •   --fast[=#]: переключает на ультра-быстрые уровни сжатия. Если =# не указано, по умолчанию 1. Чем выше значение, тем быстрее скорость сжатия, за счет некоторого коэффициента сжатия. Эта настройка перезаписывает уровень сжатия, если он был установлен ранее. Аналогично, если уровень сжатия установлен после --fast, он перезапишет его.

       •   -T#, --threads=#: Сжатие с использованием # рабочих потоков (по умолчанию: 1). Если # равно 0, попытка обнаружить и использовать количество физических ядер CPU. Во всех случаях количество потоков ограничено ZSTDMT_NBWORKERS_MAX, которое равно 64 в 32-битном режиме или 256 в 64-битных средах. Этот модификатор ничего не делает, если zstd скомпилирован без поддержки многопоточности.

       •   --single-thread: Использовать один поток для ввода/вывода и сжатия. Поскольку сжатие сериализуется с вводом/выводом, это может быть немного медленнее. Режим с одним потоком имеет значительно меньший расход памяти, что может быть полезно для систем с ограниченным количеством памяти, таких как 32-битные системы.

	   Примечание 1: это единственный доступный режим, когда поддержка многопоточности отключена.

	   Примечание 2: этот режим отличается от -T1, который запускает 1 поток сжатия параллельно с вводом/выводом. Итоговый сжатый результат также немного отличается от -T1.

       •   --auto-threads={physical,logical} (по умолчанию: physical): При использовании количества потоков по умолчанию через -T0, выбирать значение на основе количества обнаруженных физических или логических ядер.

       •   --adapt[=min=#,max=#]: zstd будет динамически адаптировать уровень сжатия к воспринимаемым условиям ввода/вывода. Адаптация уровня сжатия может быть наблюдаема в реальном времени с помощью команды -v. Адаптация может быть ограничена между указанными минимальными и максимальными уровнями. Эта функция работает при комбинации с многопоточностью и режимом --long. Она не работает с --single-thread. По умолчанию устанавливает размер окна в 8 MiB (можно изменить вручную, см. wlog). Из-за хаотической природы динамической адаптации, сжатый результат не воспроизводим.

	   Примечание: на момент написания --adapt может застрять на низкой скорости при комбинации с несколькими рабочими потоками (>=2).

       •   --long[=#]: включает поиск на большие расстояния с # windowLog, если # не указано, по умолчанию 27. Это увеличивает размер окна (windowLog) и расход памяти как для компрессора, так и для декомпрессора. Эта настройка предназначена для улучшения коэффициента сжатия для файлов с длинными совпадениями на большом расстоянии.

	   Примечание: Если windowLog установлен больше, чем 27, для декомпрессора нужно передать --long=windowLog или --memory=windowSize.

       •   -D DICT: использовать DICT в качестве словаря для сжатия или распаковки FILE(ов)

       •   --patch-from FILE: Указать файл, который будет использоваться как точка отсчета для дифференциального движка zstd. Это эффективно сжатие со словарем с некоторыми удобными параметрами выбора, а именно, что windowSize > srcSize.

	   Примечание: нельзя использовать это и -D вместе.

	   Примечание: режим --long будет автоматически активирован, если chainLog < fileLog (fileLog - это windowLog, необходимый для покрытия всего файла). Вы также можете принудительно активировать его.

	   Примечание: до уровня 15 вы можете использовать --patch-from в режиме --single-thread, чтобы немного улучшить коэффициент сжатия за счет скорости. Использование '--single-thread' выше уровня 15 приведет к худшему коэффициенту сжатия.

	   Примечание: для уровня 19 вы можете получить повышенный коэффициент сжатия за счет скорости, указав --zstd=targetLength= что-то большое (т.е. 4096), и установив большой --zstd=chainLog=.

       •   --rsyncable: zstd будет периодически синхронизировать состояние сжатия, чтобы сделать сжатый файл более совместимым с rsync. Это имеет незначительное влияние на коэффициент сжатия и потенциальное влияние на скорость сжатия, заметное на более высоких скоростях, например, при комбинации --rsyncable с многими параллельными рабочими потоками. Эта функция не работает с --single-thread. Вероятно, вы не захотите использовать ее с режимом длинного диапазона, поскольку это уменьшит эффективность точек синхронизации, но это может варьироваться.

       •   -C,	--[no-]check: добавить проверку целостности, вычисленную из несжатых данных (по умолчанию: включено)

       •   --[no-]content-size: включить / отключить, хранится ли исходный размер файла в заголовке сжатого файла. Опция по умолчанию - --content-size (значит, что исходный размер будет размещен в заголовке).

       •   --no-dictID: не хранить идентификатор словаря в заголовке фрейма (сжатие со словарем). Декодеру придется полагаться на неявные знания о том, какой словарь использовать, он не сможет проверить, правильный ли он.

       •   -M#, --memory=#: Установить лимит использования памяти. По умолчанию zstd использует 128 MiB для распаковки как максимальное количество памяти, которое декомпрессор может использовать, но вы можете переопределить это вручную в любом направлении (т.е. увеличить или уменьшить).

	   Это также используется во время сжатия при использовании с --patch-from=. В этом случае этот параметр переопределяет максимальный размер, разрешенный для словаря. (128 MiB).

	   Кроме того, это можно использовать для ограничения памяти для обучения словарю. Этот параметр переопределяет лимит по умолчанию в 2 GiB. zstd загрузит образцы обучения до лимита памяти и игнорирует остальное.

       •   --stream-size=#: Устанавливает обещанный исходный размер ввода из потока. Это значение должно быть точным, так как оно будет включено в заголовок созданного фрейма. Эта информация будет использоваться для лучшей оптимизации параметров сжатия, что приведет к лучшему и потенциально более быстрому сжатию, особенно для меньших исходных размеров.

       •   --size-hint=#: При обработке ввода из потока zstd должен угадывать, насколько большим будет исходный размер при оптимизации параметров сжатия. Если размер потока относительно мал, это предположение может быть плохим, что приведет к более высокому коэффициенту сжатия, чем ожидалось. Эта функция позволяет контролировать предположение, когда это необходимо. Точные предположения приводят к лучшему коэффициенту сжатия. Переоценки приводят к небольшому ухудшению коэффициента сжатия, в то время как недооценки могут привести к значительному ухудшению.

       •   --target-compressed-block-size=#:  Пытаться создавать сжатые блоки примерно этого размера. Это разделит большие блоки, чтобы приблизиться к этой цели. Эта функция особенно полезна для улучшения задержки, когда получатель может использовать получение неполных данных на ранней стадии. Этот параметр определяет приблизительную цель: сжатые блоки будут стремиться к этому размеру "в среднем", но отдельные блоки могут быть больше или меньше. Включение этой функции может уменьшить скорость сжатия на до ~10% на уровне 1. Более высокие уровни увидят меньшую относительную регрессию скорости, становясь незаметной на более высоких настройках.

       •   -f,	--force: отключить проверки ввода и вывода. Позволяет перезаписывать существующие файлы, ввод из консоли, вывод в stdout, работу с ссылками, блочными устройствами и т.д. Во время распаковки и когда пункт назначения вывода - stdout, пропускать неподдерживаемые форматы как есть.

       •   -c, --stdout: записывать в стандартный вывод (даже если это консоль); сохранять исходные файлы (отключить --rm).

       •   -o FILE: сохранять результат в FILE. Обратите внимание, что эта операция конфликтует с -c. Если обе операции присутствуют в командной строке, последняя выраженная побеждает.

       •   --[no-]sparse: включить / отключить поддержку разреженной ФС, чтобы файлы с многими нулями были меньше на диске. Создание разреженных файлов может сэкономить место на диске и ускорить распаковку за счет снижения количества операций ввода/вывода. По умолчанию: включено, когда вывод в файл, и отключено, когда вывод в stdout. Эта настройка переопределяет значение по умолчанию и может принудительно включить режим разреженности для stdout.

       •   --[no-]pass-through включить / отключить пропуск несжатых файлов как есть. Во время распаковки, когда пропуск включен, неподдерживаемые форматы будут скопированы как есть из ввода в вывод. По умолчанию пропуск происходит, когда пункт назначения вывода - stdout и опция force (-f) установлена.

       •   --rm: удалить исходные файл(ы) после успешного сжатия или распаковки. Эта команда игнорируется молча, если вывод - stdout. Если используется в комбинации с -o, вызывает запрос подтверждения (который можно отключить с -f), так как это деструктивная операция.

       •   -k, --keep: сохранять исходные файл(ы) после успешного сжатия или распаковки. Это поведение по умолчанию.

       •   -r: работать рекурсивно с каталогами. Выбирает все файлы в указанном каталоге и всех его подкаталогах. Это может быть полезно как для сокращения ввода командной строки, так и для обхода ограничений расширения оболочки, когда много файлов и наименование превышает максимальный размер командной строки.

       •   --filelist FILE читать список файлов для обработки как содержимое из FILE. Формат совместим с выводом ls, с одним файлом на строку.

       •   --output-dir-flat DIR: результирующие файлы сохраняются в целевом каталоге DIR, вместо того же каталога, что и исходный файл. Будьте осторожны, так как эта команда может вызвать проблемы с коллизиями имен, если несколько файлов из разных каталогов заканчиваются одним и тем же именем. Разрешение коллизий обеспечивает, что первый файл с данным именем будет присутствовать в DIR, в то время как в комбинации с -f последний файл будет присутствовать вместо этого.

       •   --output-dir-mirror DIR: похоже на --output-dir-flat, результирующие файлы сохраняются под целевым каталогом DIR, но эта опция будет реплицировать иерархию каталогов ввода в DIR.

	   Если входной каталог содержит "..", файлы в этом каталоге будут игнорироваться. Если входной каталог - абсолютный (т.е. "/var/tmp/abc"), он будет сохранен в "output-dir/var/tmp/abc". Если есть несколько входных файлов или каталогов, разрешение коллизий имен будет следовать тем же правилам, что и --output-dir-flat.

       •   --format=FORMAT: сжимать и распаковывать в других форматах. Если скомпилировано с поддержкой, zstd может сжимать в или распаковывать из форматов других алгоритмов сжатия. Возможные варианты: zstd, gzip, xz, lzma и lz4. Если формат не указан, по умолчанию zstd.

       •   -h/-H, --help: отобразить справку/полную справку и выйти

       •   -V, --version: отобразить номер версии и немедленно выйти. Обратите внимание, что, поскольку это выходит, флаги, указанные после -V, эффективно игнорируются. Продвинутый: -vV также отображает поддерживаемые форматы. -vvV также отображает поддержку POSIX. -qV отобразит только номер версии, подходящий для машинного чтения.

       •   -v, --verbose: режим подробного вывода, отображать больше информации

       •   -q, --quiet: подавлять предупреждения, интерактивность и уведомления. Укажите дважды, чтобы подавить ошибки тоже.

       •   --no-progress: не отображать индикатор прогресса, но сохранять все остальные сообщения.

       •   --show-default-cparams: показывает параметры сжатия по умолчанию, которые будут использоваться для конкретного входного файла, на основе предоставленного уровня сжатия и размера входных данных. Если предоставленный файл не является обычным файлом (например, pipe), этот флаг выведет параметры, используемые для входных данных неизвестного размера.

       •   --exclude-compressed: сжимать только файлы, которые не сжаты уже.

       •   --: Все аргументы после -- рассматриваются как файлы



   Модификаторы операции gzip
       При вызове через симлинк gzip zstd будет поддерживать дополнительные опции, предназначенные для имитации поведения gzip:

       -n, --no-name
	      не хранить исходное имя файла и временные метки при сжатии файла. Это поведение по умолчанию, поэтому это бессмысленно.

   Переменные окружения
       Использование переменных окружения для установки параметров имеет последствия для безопасности. Поэтому этот подход намеренно ограничен. В настоящее время поддерживаются только ZSTD_CLEVEL и ZSTD_NBTHREADS. Они устанавливают уровень сжатия по умолчанию и количество потоков для использования во время сжатия соответственно.

       ZSTD_CLEVEL можно использовать для установки уровня между 1 и 19 (нормальный диапазон). Если значение ZSTD_CLEVEL не является допустимым целым числом, оно будет игнорироваться с сообщением предупреждения. ZSTD_CLEVEL просто заменяет уровень сжатия по умолчанию (3).

       ZSTD_NBTHREADS можно использовать для установки количества потоков, которые zstd попытается использовать во время сжатия. Если значение ZSTD_NBTHREADS не является допустимым беззнаковым целым числом, оно будет игнорироваться с сообщением предупреждения. ZSTD_NBTHREADS имеет значение по умолчанию (1) и ограничено ZSTDMT_NBWORKERS_MAX==200. zstd должен быть скомпилирован с поддержкой многопоточности, чтобы эта переменная имела эффект.

       Их обоих можно переопределить соответствующими аргументами командной строки: -# для уровня сжатия и -T# для количества потоков сжатия.

ADVANCED COMPRESSION OPTIONS
       zstd предоставляет 22 предопределенных регулярных уровня сжатия плюс быстрые уровни. Уровень сжатия переводится внутренне в несколько продвинутых параметров, которые управляют поведением компрессора (результат этого перевода можно наблюдать с --show-default-cparams). Эти продвинутые параметры можно переопределить с помощью продвинутых опций сжатия.

   --zstd[=options]:
       Опции предоставляются в виде списка, разделенного запятыми. Вы можете указать только опции, которые хотите изменить, а остальные будут взяты из выбранного или уровня сжатия по умолчанию. Список доступных опций:

       strategy=strat, strat=strat
	      Указать стратегию, используемую поисковиком совпадений.

	      Существует 9 стратегий, нумерованных от 1 до 9, от самой быстрой до самой сильной: 1=ZSTD_fast, 2=ZSTD_dfast, 3=ZSTD_greedy, 4=ZSTD_lazy, 5=ZSTD_lazy2, 6=ZSTD_btlazy2, 7=ZSTD_btopt, 8=ZSTD_btultra, 9=ZSTD_btultra2.

       windowLog=wlog, wlog=wlog
	      Указать максимальное количество бит для расстояния совпадения.

	      Более высокое число увеличивает шанс найти совпадение, что обычно улучшает коэффициент сжатия. Это также увеличивает требования к памяти для компрессора и декомпрессора. Минимальное wlog - 10 (1 KiB), а максимальное - 30 (1 GiB) на 32-битных платформах и 31 (2 GiB) на 64-битных платформах.

	      Примечание: Если windowLog установлен больше, чем 27, для декомпрессора нужно передать --long=windowLog или --memory=windowSize.

       hashLog=hlog, hlog=hlog
	      Указать максимальное количество бит для хеш-таблицы.

	      Большие хеш-таблицы вызывают меньше коллизий, что обычно делает сжатие быстрее, но требует больше памяти во время сжатия.

	      Минимальное hlog - 6 (64 записей / 256 B), а максимальное - 30 (1B записей / 4 GiB).

       chainLog=clog, clog=clog
	      Указать максимальное количество бит для вторичной поисковой структуры, форма которой зависит от выбранной стратегии.

	      Более высокие числа бит увеличивают шанс найти совпадение, что обычно улучшает коэффициент сжатия. Это также замедляет сжатие и увеличивает требования к памяти для сжатия. Эта опция игнорируется для стратегии ZSTD_fast, у которой есть только основная хеш-таблица.

	      Минимальное clog - 6 (64 записей / 256 B), а максимальное - 29 (512M записей / 2 GiB) на 32-битных платформах и 30 (1B записей / 4 GiB) на 64-битных платформах.

       searchLog=slog, slog=slog
	      Указать максимальное количество поисков в цепочке хешей или бинарном дереве с использованием логарифмической шкалы.

	      Больше поисков увеличивает шанс найти совпадение, что обычно увеличивает коэффициент сжатия, но уменьшает скорость сжатия.

	      Минимальное slog - 1, а максимальное - 'windowLog' - 1.

       minMatch=mml, mml=mml
	      Указать минимальную искомую длину совпадения в хеш-таблице.

	      Более длинные длины поиска обычно уменьшают коэффициент сжатия, но улучшают скорость распаковки.

	      Минимальное mml - 3, а максимальное - 7.

       targetLength=tlen, tlen=tlen
	      Влияние этого поля варьируется в зависимости от выбранной стратегии.

	      Для ZSTD_btopt, ZSTD_btultra и ZSTD_btultra2 это указывает минимальную длину совпадения, которая заставляет поисковик совпадений остановиться. Более длинная targetLength обычно улучшает коэффициент сжатия, но уменьшает скорость сжатия.

	      Для ZSTD_fast это активирует ультра-быстрый режим, когда > 0. Значение представляет количество пропущенных данных между выборками совпадений. Влияние обратное: более длинная targetLength увеличивает скорость сжатия, но уменьшает коэффициент сжатия.

	      Для всех других стратегий это поле не имеет влияния.

	      Минимальное tlen - 0, а максимальное - 128 KiB.

       overlapLog=ovlog, ovlog=ovlog
	      Определяет overlapSize, количество данных, загружаемых из предыдущей задачи. Этот параметр доступен только при включенной многопоточности. Загрузка большего количества данных улучшает коэффициент сжатия, но уменьшает скорость.

	      Минимальное ovlog - 0, а максимальное - 9. 1 означает "без перекрытия", то есть полностью независимые задачи. 9 означает "полное перекрытие", то есть до windowSize загружается из предыдущей задачи. Уменьшение ovlog на 1 уменьшает загружаемое количество в 2 раза. Например, 8 означает "windowSize/2", а 6 означает "windowSize/8". Значение 0 специальное и означает "по умолчанию": ovlog автоматически определяется zstd. В этом случае ovlog будет в диапазоне от 6 до 9, в зависимости от выбранной стратегии.

       ldmHashLog=lhlog, lhlog=lhlog
	      Указать максимальный размер для хеш-таблицы, используемой для поиска на большие расстояния.

	      Эта опция игнорируется, если поиск на большие расстояния не включен.

	      Большие хеш-таблицы обычно улучшают коэффициент сжатия за счет большего расхода памяти во время сжатия и уменьшения скорости сжатия.

	      Минимальное lhlog - 6, а максимальное - 30 (по умолчанию: 20).

       ldmMinMatch=lmml, lmml=lmml
	      Указать минимальную искомую длину совпадения для поиска на большие расстояния.

	      Эта опция игнорируется, если поиск на большие расстояния не включен.

	      Более длинные/очень короткие значения обычно уменьшают коэффициент сжатия.

	      Минимальное lmml - 4, а максимальное - 4096 (по умолчанию: 64).

       ldmBucketSizeLog=lblog, lblog=lblog
	      Указать размер каждого корзины для хеш-таблицы, используемой для поиска на большие расстояния.

	      Эта опция игнорируется, если поиск на большие расстояния не включен.

	      Большие размеры корзин улучшают разрешение коллизий, но уменьшают скорость сжатия.

	      Минимальное lblog - 1, а максимальное - 8 (по умолчанию: 3).

       ldmHashRateLog=lhrlog, lhrlog=lhrlog
	      Указать частоту вставки записей в хеш-таблицу для поиска на большие расстояния.

	      Эта опция игнорируется, если поиск на большие расстояния не включен.

	      Более высокие значения улучшат скорость сжатия. Значительное отклонение от значения по умолчанию, вероятно, приведет к уменьшению коэффициента сжатия.

	      Значение по умолчанию - wlog - lhlog.

   Пример
       Следующие параметры устанавливают продвинутые опции сжатия, похожие на предопределенный уровень 19 для файлов больше, чем 256 KB:

       --zstd=wlog=23,clog=23,hlog=22,slog=6,mml=3,tlen=48,strat=6

   -B#:
       Указать размер каждой задачи сжатия. Этот параметр доступен только при включенной многопоточности. Каждая задача сжатия выполняется параллельно, так что это значение косвенно влияет на количество активных потоков. Размер задачи по умолчанию варьируется в зависимости от уровня сжатия (в общем, 4 * windowSize). -B# позволяет вручную выбрать пользовательский размер. Обратите внимание, что размер задачи должен уважать минимальное значение, которое применяется прозрачно. Это минимум - либо 512 KB, либо overlapSize, в зависимости от того, что больше. Разные размеры задач приведут к неидентичным сжатым фреймам.

DICTIONARY BUILDER
       zstd предлагает сжатие со словарем, которое значительно улучшает эффективность для небольших файлов и сообщений. Возможна настройка zstd на наборе образцов, результатом чего является файл, называемый словарем. Затем, во время сжатия и распаковки, сослаться на тот же словарь с помощью команды -D dictionaryFileName. Сжатие небольших файлов, похожих на набор образцов, значительно улучшится.

       --train FILEs
	      Использовать FILEs в качестве набора для обучения для создания словаря. В наборе должно быть много образцов (> 100), и вес обычно в 100 раз больше целевого размера словаря (например, ~10 MB для словаря 100 KB). --train можно комбинировать с -r, чтобы указать каталог, а не перечислять все файлы, что может быть полезно для обхода ограничений расширения оболочки.

	      Поскольку сжатие со словарем в основном эффективно для небольших файлов, ожидается, что набор для обучения будет содержать только небольшие файлы. В случае, если некоторые образцы окажутся большими, только первые 128 KiB этих образцов будут использоваться для обучения.

	      --train поддерживает многопоточность, если zstd скомпилирован с поддержкой потоков (по умолчанию). Дополнительные продвинутые параметры можно указать с --train-fastcover. Наследовательный построитель словарей можно получить с --train-legacy. Более медленный построитель словарей cover можно получить с --train-cover. По умолчанию --train эквивалентно --train-fastcover=d=8,steps=4.

       -o FILE
	      Словарь сохранен в FILE (имя по умолчанию: dictionary).

       --maxdict=#
	      Ограничить словарь указанным размером (по умолчанию: 112640 байт). Как обычно, количества выражаются в байтах по умолчанию, и возможно использовать суффиксы (как KB или MB) для указания больших значений.

       -#     Использовать # уровень сжатия во время обучения (необязательно). Сгенерирует статистику, более настроенную для выбранного уровня сжатия, что приведет к небольшому улучшению коэффициента сжатия на этом уровне.

       -B#    Разделить входные файлы на блоки размера # (по умолчанию: без разделения)

       -M#, --memory=#
	      Ограничить количество данных образцов, загружаемых для обучения (по умолчанию: 2 GiB). Обратите внимание, что значение по умолчанию (2 GiB) также является максимальным. Этот параметр может быть полезен в ситуациях, когда размер набора для обучения не контролируется и может быть потенциально очень большим. Поскольку скорость процесса обучения напрямую коррелирует с размером набора образцов, меньший набор приводит к более быстрому обучению.

	      В ситуациях, где набор для обучения больше максимальной памяти, CLI случайным образом выберет образцы среди доступных, до максимального допустимого бюджета памяти. Это предназначено для улучшения релевантности словаря за счет смягчения потенциального воздействия кластеризации, например, выбора только файлов из начала списка, отсортированного по дате модификации, или по алфавитному порядку. Процесс рандомизации детерминирован, так что обучение одного и того же списка файлов с одинаковыми параметрами приведет к созданию одного и того же словаря.

       --dictID=#
	      Идентификатор словаря - локально уникальный идентификатор. Декодер будет использовать это значение для проверки, что он использует правильный словарь. По умолчанию zstd создаст 4-байтовое случайное число идентификатора. Возможна установка явного числового идентификатора. Это зависит от менеджера словарей, чтобы не назначать один и тот же идентификатор двум разным словарям. Обратите внимание, что короткие числа имеют преимущество: идентификатор < 256 будет нуждаться только в 1 байте в заголовке сжатого фрейма, а идентификатор < 65536 - только в 2 байтах. Это сравнивается благоприятно с 4 байтами по умолчанию.

	      Обратите внимание, что RFC8878 резервирует идентификаторы меньше 32768 и больше или равные 2^31, так что их не следует использовать в публичных целях.

       --train-cover[=k#,d=#,steps=#,split=#,shrink[=#]]
	      Выбрать параметры для алгоритма построителя словарей по умолчанию, называемого cover. Если d не указано, то оно попробует d = 6 и d = 8. Если k не указано, то оно попробует значения steps в диапазоне [50, 2000]. Если steps не указано, то используется значение по умолчанию 40. Если split не указано или split <= 0, то используется значение по умолчанию 100. Требуется, чтобы d <= k. Если флаг shrink не используется, то используется значение по умолчанию для shrinkDict 0. Если shrink не указано, то используется значение по умолчанию для shrinkDictMaxRegression 1.

	      Выбирает сегменты размера k с наивысшим баллом для размещения в словаре. Балл сегмента вычисляется как сумма частот всех подсегментов размера d. В общем d должно быть в диапазоне [6, 8], иногда до 16, но алгоритм будет работать быстрее с d <= 8. Хорошие значения для k сильно варьируются в зависимости от входных данных, но безопасный диапазон - [2 * d, 2000]. Если split равно 100, все входные образцы используются как для обучения, так и для тестирования, чтобы найти оптимальные d и k для построения словаря. Поддерживает многопоточность, если zstd скомпилирован с поддержкой потоков. Включение shrink берет усеченный словарь минимального размера и удваивает размер, пока коэффициент сжатия усеченного словаря не будет как минимум на shrinkDictMaxRegression% хуже, чем коэффициент сжатия самого большого словаря.

	      Примеры:

	      zstd --train-cover FILEs

	      zstd --train-cover=k=50,d=8 FILEs

	      zstd --train-cover=d=8,steps=500 FILEs

	      zstd --train-cover=k=50 FILEs

	      zstd --train-cover=k=50,split=60 FILEs

	      zstd --train-cover=shrink FILEs

	      zstd --train-cover=shrink=2 FILEs

       --train-fastcover[=k#,d=#,f=#,steps=#,split=#,accel=#]
	      То же, что и cover, но с дополнительными параметрами f и accel и другим значением split по умолчанию. Если split не указано, то оно попробует split = 75. Если f не указано, то оно попробует f = 20. Требуется, чтобы 0 < f < 32. Если accel не указано, то оно попробует accel = 1. Требуется, чтобы 0 < accel <= 10. Требуется, чтобы d = 6 или d = 8.

	      f - логарифм размера массива, который отслеживает частоту подсегментов размера d. Подсегмент хешируется в индекс в диапазоне [0,2^f - 1]. Возможна ситуация, что 2 разных подсегмента хешируются в один и тот же индекс, и они рассматриваются как один и тот же подсегмент при вычислении частоты. Использование более высокого f уменьшает коллизии, но занимает больше времени.

	      Примеры:

	      zstd --train-fastcover FILEs

	      zstd --train-fastcover=d=8,f=15,accel=2 FILEs

       --train-legacy[=selectivity=#]
	      Использовать алгоритм построителя словарей legacy с указанной селективностью словаря (по умолчанию: 9). Чем меньше значение селективности, тем плотнее словарь, что улучшает его эффективность, но уменьшает достижимый максимальный размер. --train-legacy=s=# также принимается.

	      Примеры:

	      zstd --train-legacy FILEs

	      zstd --train-legacy=selectivity=8 FILEs

BENCHMARK
       zstd CLI предоставляет режим тестирования производительности, который можно использовать для легкого поиска подходящих параметров сжатия или, альтернативно, для тестирования производительности компьютера. zstd -b [FILE(s)] протестирует zstd для как сжатия, так и распаковки с использованием уровня сжатия по умолчанию. Обратите внимание, что результаты сильно зависят от сжимаемого содержимого. Возможна передача нескольких файлов для тестирования, и даже каталога с -r DIRECTORY. Если FILE не предоставлено, тестирование будет использовать процедурно сгенерированный текст lorem ipsum.

       •   -b#: протестировать файл(ы) с использованием уровня сжатия #

       •   -e#: протестировать файл(ы) с использованием нескольких уровней сжатия, от -b# до -e# (включительно)

       •   -d: протестировать только скорость распаковки (требует предоставления сжатого содержимого zstd)

       •   -i#: минимальное время оценки, в секундах (по умолчанию: 3s), только режим тестирования

       •   -B#, --block-size=#: разрезать файл(ы) на независимые фрагменты размера #

       •   -S: выводить один результат тестирования на входной файл (по умолчанию: консолидированный результат)

       •   -D dictionary протестировать с использованием словаря

       •   --priority=rt: установить приоритет процесса на реальное время (Windows)



       Помимо уровней сжатия, тестирование также совместимо с другими параметрами, такими как количество потоков (-T#), продвинутыми параметрами сжатия (--zstd=###), сжатием со словарем (-D dictionary) или даже отключением проверки контрольной суммы, например.

       Формат вывода: CompressionLevel#Filename: InputSize -> OutputSize (CompressionRatio), CompressionSpeed, DecompressionSpeed

       Методология: Для измерения скорости весь ввод сжимается/распаковывается в памяти для измерения скорости. Запуск lasts хотя бы 1 секунду, так что при небольших файлах они сжимаются/распаковываются несколько раз за запуск, чтобы улучшить точность измерения.

SEE ALSO
       zstdgrep(1), zstdless(1), gzip(1), xz(1)

       Формат zstandard указан в Y. Collet, "Zstandard Compression and the 'application/zstd' Media Type", https://www.ietf.org/rfc/rfc8878.txt, Internet RFC 8878 (February 2021).

BUGS
       Сообщить об ошибках: https://github.com/facebook/zstd/issues

AUTHOR
       Yann Collet



zstd 1.5.6			 October 2024			       ZSTD(1)
ZSTD(1)				 User Commands			       ZSTD(1)



NAME
       zstd  -	zstd,  zstdmt,	unzstd,	 zstdcat - Compress or decompress .zst
       files

SYNOPSIS
       allbox; zstd [OPTIONS] [-   INPUT-FILE] [-o OUTPUT-FILE]

       zstdmt is equivalent to zstd -T0

       unzstd is equivalent to zstd -d

       zstdcat is equivalent to zstd -dcf

DESCRIPTION
       zstd is a fast lossless	compression  algorithm	and  data  compression
       tool,  with  command  line  syntax  similar to gzip(1) and xz(1). It is
       based on the LZ77 family, with further FSE & huff0 entropy stages. zstd
       offers  highly configurable compression speed, from fast modes at > 200
       MB/s per core, to strong modes with excellent  compression  ratios.  It
       also  features  a  very	fast decoder, with speeds > 500 MB/s per core,
       which remains roughly stable at all compression settings.

       zstd command line syntax is generally similar to gzip, but features the
       following few differences:

       •   Source files are preserved by default. It's possible to remove them
	   automatically by using the --rm command.

       •   When compressing a single file, zstd	 displays  progress  notifica‐
	   tions and result summary by default. Use -q to turn them off.

       •   zstd	 displays a short help page when command line is an error. Use
	   -q to turn it off.

       •   zstd does not accept input from  console,  though  it  does	accept
	   stdin when it's not the console.

       •   zstd	 does  not  store the input's filename or attributes, only its
	   contents.



       zstd processes each file according to the selected operation  mode.  If
       no  files  are  given  or file is -, zstd reads from standard input and
       writes the processed data to standard output. zstd will refuse to write
       compressed data to standard output if it is a terminal: it will display
       an error message and skip the file. Similarly, zstd will refuse to read
       compressed data from standard input if it is a terminal.

       Unless  --stdout	 or  -o	 is specified, files are written to a new file
       whose name is derived from the source file name:

       •   When compressing, the suffix .zst is appended to the	 source	 file‐
	   name to get the target filename.

       •   When	 decompressing,	 the  .zst  suffix  is removed from the source
	   filename to get the target filename



   Concatenation with .zst Files
       It is possible to concatenate multiple .zst files. zstd will decompress
       such agglomerated file as if it was a single .zst file.

OPTIONS
   Integer Suffixes and Special Values
       In  most places where an integer argument is expected, an optional suf‐
       fix is supported to easily indicate large integers. There  must	be  no
       space between the integer and the suffix.

       KiB    Multiply	the  integer  by  1,024 (2\^10). Ki, K, and KB are ac‐
	      cepted as synonyms for KiB.

       MiB    Multiply the integer by 1,048,576 (2\^20). Mi, M, and MB are ac‐
	      cepted as synonyms for MiB.

   Operation Mode
       If  multiple  operation	mode options are given, the last one takes ef‐
       fect.

       -z, --compress
	      Compress. This is the default operation mode when	 no  operation
	      mode  option is specified and no other operation mode is implied
	      from the command name  (for  example,  unzstd  implies  --decom‐
	      press).

       -d, --decompress, --uncompress
	      Decompress.

       -t, --test
	      Test  the	 integrity of compressed files. This option is equiva‐
	      lent to --decompress --stdout > /dev/null, decompressed data  is
	      discarded	 and  checksummed  for errors. No files are created or
	      removed.

       -b#    Benchmark file(s) using compression level #. See BENCHMARK below
	      for a description of this operation.

       --train FILES
	      Use FILES as a training set to create a dictionary. The training
	      set should contain a lot of small files (> 100). See  DICTIONARY
	      BUILDER below for a description of this operation.

       -l, --list
	      Display  information  related to a zstd compressed file, such as
	      size, ratio, and checksum. Some  of  these  fields  may  not  be
	      available.  This	command's  output can be augmented with the -v
	      modifier.

   Operation Modifiers
       •   -#: selects # compression level [1-19] (default:  3).  Higher  com‐
	   pression  levels  generally produce higher compression ratio at the
	   expense of speed and memory. A rough rule of thumb is that compres‐
	   sion	 speed	is expected to be divided by 2 every 2 levels. Techni‐
	   cally, each level is mapped to a set of advanced  parameters	 (that
	   can also be modified individually, see below). Because the compres‐
	   sor's behavior highly depends on the content to  compress,  there's
	   no guarantee of a smooth progression from one level to another.

       •   --ultra:  unlocks high compression levels 20+ (maximum 22), using a
	   lot more memory. Note that decompression  will  also	 require  more
	   memory when using these levels.

       •   --fast[=#]:	switch	to ultra-fast compression levels. If =# is not
	   present, it defaults to 1. The higher the  value,  the  faster  the
	   compression speed, at the cost of some compression ratio. This set‐
	   ting overwrites compression level if one was set previously.	 Simi‐
	   larly, if a compression level is set after --fast, it overrides it.

       •   -T#, --threads=#: Compress using # working threads (default: 1). If
	   # is 0, attempt to detect and use the number of physical CPU cores.
	   In  all cases, the nb of threads is capped to ZSTDMT_NBWORKERS_MAX,
	   which is either 64 in 32-bit mode, or 256 for 64-bit	 environments.
	   This	 modifier does nothing if zstd is compiled without multithread
	   support.

       •   --single-thread: Use a single thread for both I/O and  compression.
	   As compression is serialized with I/O, this can be slightly slower.
	   Single-thread mode features significantly lower memory usage, which
	   can	be  useful  for systems with limited amount of memory, such as
	   32-bit systems.

	   Note 1: this mode is the only available one when  multithread  sup‐
	   port is disabled.

	   Note 2: this mode is different from -T1, which spawns 1 compression
	   thread in parallel  with  I/O.  Final  compressed  result  is  also
	   slightly different from -T1.

       •   --auto-threads={physical,logical} (default: physical): When using a
	   default amount of threads via -T0, choose the default based on  the
	   number of detected physical or logical cores.

       •   --adapt[=min=#,max=#]:  zstd	 will  dynamically  adapt  compression
	   level to perceived I/O conditions. Compression level adaptation can
	   be observed live by using command -v. Adaptation can be constrained
	   between supplied min and max levels. The feature  works  when  com‐
	   bined  with	multi-threading and --long mode. It does not work with
	   --single-thread. It sets window size to 8 MiB by  default  (can  be
	   changed  manually,  see wlog). Due to the chaotic nature of dynamic
	   adaptation, compressed result is not reproducible.

	   Note: at the time of this writing, --adapt can remain stuck at  low
	   speed when combined with multiple worker threads (>=2).

       •   --long[=#]:	enables	 long distance matching with # windowLog, if #
	   is not present it defaults to 27. This increases  the  window  size
	   (windowLog) and memory usage for both the compressor and decompres‐
	   sor. This setting is designed to improve the compression ratio  for
	   files with long matches at a large distance.

	   Note:  If  windowLog	 is set to larger than 27, --long=windowLog or
	   --memory=windowSize needs to be passed to the decompressor.

       •   -D DICT: use DICT as Dictionary to compress or decompress FILE(s)

       •   --patch-from FILE: Specify the file to be used as a reference point
	   for	zstd's diff engine. This is effectively dictionary compression
	   with some convenient parameter selection, namely that windowSize  >
	   srcSize.

	   Note: cannot use both this and -D together.

	   Note:  --long  mode	will  be automatically activated if chainLog <
	   fileLog (fileLog being the windowLog required to  cover  the	 whole
	   file). You can also manually force it.

	   Note:  up  to level 15, you can use --patch-from in --single-thread
	   mode to improve compression ratio marginally at the cost of	speed.
	   Using  '--single-thread' above level 15 will lead to lower compres‐
	   sion ratios.

	   Note: for level 19, you can get increased compression ratio at  the
	   cost	 of  speed  by specifying --zstd=targetLength= to be something
	   large (i.e. 4096), and by setting a large --zstd=chainLog=.

       •   --rsyncable: zstd will  periodically	 synchronize  the  compression
	   state  to  make the compressed file more rsync-friendly. There is a
	   negligible impact to compression ratio, and a potential  impact  to
	   compression	speed,	perceptible at higher speeds, for example when
	   combining --rsyncable with many parallel worker threads. This  fea‐
	   ture does not work with --single-thread. You probably don't want to
	   use it with long range mode, since it will decrease the  effective‐
	   ness of the synchronization points, but your mileage may vary.

       •   -C,	--[no-]check:  add  integrity check computed from uncompressed
	   data (default: enabled)

       •   --[no-]content-size: enable / disable whether or not	 the  original
	   size	 of  the  file is placed in the header of the compressed file.
	   The default option is --content-size	 (meaning  that	 the  original
	   size will be placed in the header).

       •   --no-dictID:	 do  not store dictionary ID within frame header (dic‐
	   tionary compression). The decoder will have	to  rely  on  implicit
	   knowledge  about which dictionary to use, it won't be able to check
	   if it's correct.

       •   -M#, --memory=#: Set a memory usage limit. By  default,  zstd  uses
	   128	MiB  for decompression as the maximum amount of memory the de‐
	   compressor is allowed to use, but you can override this manually if
	   need be in either direction (i.e. you can increase or decrease it).

	   This is also used during compression when using with --patch-from=.
	   In this case, this parameter overrides that	maximum	 size  allowed
	   for a dictionary. (128 MiB).

	   Additionally,  this	can  be	 used  to  limit memory for dictionary
	   training. This parameter overrides the default limit of 2 GiB. zstd
	   will	 load  training	 samples up to the memory limit and ignore the
	   rest.

       •   --stream-size=#: Sets the pledged source size of input coming  from
	   a  stream.  This value must be exact, as it will be included in the
	   produced frame header. Incorrect stream sizes will cause an	error.
	   This information will be used to better optimize compression param‐
	   eters, resulting in better and potentially faster compression,  es‐
	   pecially for smaller source sizes.

       •   --size-hint=#:  When	 handling input from a stream, zstd must guess
	   how large the source size will be when optimizing  compression  pa‐
	   rameters. If the stream size is relatively small, this guess may be
	   a poor one, resulting in a higher compression ratio than  expected.
	   This	 feature  allows  for controlling the guess when needed. Exact
	   guesses result in better compression ratios.	 Overestimates	result
	   in  slightly	 degraded compression ratios, while underestimates may
	   result in significant degradation.

       •   --target-compressed-block-size=#:  Attempt  to  produce  compressed
	   blocks of approximately this size. This will split larger blocks in
	   order to approach this target. This feature is notably  useful  for
	   improved  latency,  when  the receiver can leverage receiving early
	   incomplete data. This parameter defines a loose target:  compressed
	   blocks  will	 target	 this size "on average", but individual blocks
	   can still be larger or smaller. Enabling this feature can  decrease
	   compression	speed by up to ~10% at level 1. Higher levels will see
	   smaller relative speed regression,  becoming	 invisible  at	higher
	   settings.

       •   -f,	--force:  disable  input and output checks. Allows overwriting
	   existing files, input from console, output to stdout, operating  on
	   links, block devices, etc. During decompression and when the output
	   destination is stdout, pass-through unrecognized formats as-is.

       •   -c, --stdout: write to standard output (even if it is the console);
	   keep original files (disable --rm).

       •   -o FILE: save result into FILE. Note that this operation is in con‐
	   flict with -c. If both operations are present on the command	 line,
	   the last expressed one wins.

       •   --[no-]sparse:  enable  /  disable sparse FS support, to make files
	   with many zeroes smaller on disk. Creating sparse  files  may  save
	   disk	 space	and  speed  up decompression by reducing the amount of
	   disk I/O. default: enabled when output is into a file, and disabled
	   when output is stdout. This setting overrides default and can force
	   sparse mode over stdout.

       •   --[no-]pass-through enable / disable passing	 through  uncompressed
	   files as-is. During decompression when pass-through is enabled, un‐
	   recognized formats will be copied as-is from the input to the  out‐
	   put.	 By  default, pass-through will occur when the output destina‐
	   tion is stdout and the force (-f) option is set.

       •   --rm: remove source file(s) after successful compression or	decom‐
	   pression.  This command is silently ignored if output is stdout. If
	   used in combination with -o, triggers a confirmation prompt	(which
	   can be silenced with -f), as this is a destructive operation.

       •   -k, --keep: keep source file(s) after successful compression or de‐
	   compression. This is the default behavior.

       •   -r: operate recursively on directories. It selects all files in the
	   named directory and all its subdirectories. This can be useful both
	   to reduce command line typing, and to  circumvent  shell  expansion
	   limitations,	 when  there  are a lot of files and naming breaks the
	   maximum size of a command line.

       •   --filelist FILE read a list of files to  process  as	 content  from
	   FILE. Format is compatible with ls output, with one file per line.

       •   --output-dir-flat  DIR:  resulting files are stored into target DIR
	   directory, instead of same directory as origin file. Be aware  that
	   this	 command  can  introduce  name	collision  issues, if multiple
	   files, from different directories, end up  having  the  same	 name.
	   Collision  resolution  ensures first file with a given name will be
	   present in DIR, while in combination with -f, the last file will be
	   present instead.

       •   --output-dir-mirror	DIR:  similar to --output-dir-flat, the output
	   files are stored underneath target DIR directory, but  this	option
	   will replicate input directory hierarchy into output DIR.

	   If  input directory contains "..", the files in this directory will
	   be ignored. If input	 directory  is	an  absolute  directory	 (i.e.
	   "/var/tmp/abc"),    it    will    be	   stored   into   the	 "out‐
	   put-dir/var/tmp/abc". If there are multiple input files or directo‐
	   ries,  name	collision  resolution  will  follow  the same rules as
	   --output-dir-flat.

       •   --format=FORMAT: compress and decompress in other formats. If  com‐
	   piled  with	support, zstd can compress to or decompress from other
	   compression algorithm formats. Possibly available options are zstd,
	   gzip, xz, lzma, and lz4. If no such format is provided, zstd is the
	   default.

       •   -h/-H, --help: display help/long help and exit

       •   -V, --version: display version number and  immediately  exit.  note
	   that,  since it exits, flags specified after -V are effectively ig‐
	   nored. Advanced: -vV also displays  supported  formats.  -vvV  also
	   displays  POSIX  support. -qV will only display the version number,
	   suitable for machine reading.

       •   -v, --verbose: verbose mode, display more information

       •   -q, --quiet: suppress warnings, interactivity,  and	notifications.
	   specify twice to suppress errors too.

       •   --no-progress:  do not display the progress bar, but keep all other
	   messages.

       •   --show-default-cparams: shows the  default  compression  parameters
	   that	 will  be  used for a particular input file, based on the pro‐
	   vided compression level and the input size. If the provided file is
	   not a regular file (e.g. a pipe), this flag will output the parame‐
	   ters used for inputs of unknown size.

       •   --exclude-compressed: only compress files that are not already com‐
	   pressed.

       •   --: All arguments after -- are treated as files



   gzip Operation Modifiers
       When invoked via a gzip symlink, zstd will support further options that
       intend to mimic the gzip behavior:

       -n, --no-name
	      do not store the original filename and timestamps when compress‐
	      ing a file. This is the default behavior and hence a no-op.

       --best alias to the option -9.

   Environment Variables
       Employing environment variables to set parameters has security implica‐
       tions.  Therefore,  this	 avenue	  is   intentionally   limited.	  Only
       ZSTD_CLEVEL  and	 ZSTD_NBTHREADS	 are currently supported. They set the
       default compression level and number of threads to use during  compres‐
       sion, respectively.

       ZSTD_CLEVEL can be used to set the level between 1 and 19 (the "normal"
       range). If the value of ZSTD_CLEVEL is not a valid integer, it will  be
       ignored	with  a warning message. ZSTD_CLEVEL just replaces the default
       compression level (3).

       ZSTD_NBTHREADS can be used to set the number of threads zstd  will  at‐
       tempt  to use during compression. If the value of ZSTD_NBTHREADS is not
       a valid unsigned integer, it will be ignored with  a  warning  message.
       ZSTD_NBTHREADS  has a default value of (1), and is capped at ZSTDMT_NB‐
       WORKERS_MAX==200. zstd must be compiled with  multithread  support  for
       this variable to have any effect.

       They can both be overridden by corresponding command line arguments: -#
       for compression level and -T# for number of compression threads.

ADVANCED COMPRESSION OPTIONS
       zstd provides 22 predefined regular compression levels  plus  the  fast
       levels.	A compression level is translated internally into multiple ad‐
       vanced parameters that control the behavior of the compressor (one  can
       observe	the  result  of this translation with --show-default-cparams).
       These advanced parameters can be overridden using advanced  compression
       options.

   --zstd[=options]:
       The  options  are  provided  as a comma-separated list. You may specify
       only the options you want to change and the rest will be taken from the
       selected or default compression level. The list of available options:

       strategy=strat, strat=strat
	      Specify a strategy used by a match finder.

	      There  are  9  strategies	 numbered from 1 to 9, from fastest to
	      strongest:     1=ZSTD_fast,     2=ZSTD_dfast,	3=ZSTD_greedy,
	      4=ZSTD_lazy,    5=ZSTD_lazy2,    6=ZSTD_btlazy2,	 7=ZSTD_btopt,
	      8=ZSTD_btultra, 9=ZSTD_btultra2.

       windowLog=wlog, wlog=wlog
	      Specify the maximum number of bits for a match distance.

	      The higher number of increases the chance to find a match	 which
	      usually improves compression ratio. It also increases memory re‐
	      quirements for the compressor and decompressor. The minimum wlog
	      is  10 (1 KiB) and the maximum is 30 (1 GiB) on 32-bit platforms
	      and 31 (2 GiB) on 64-bit platforms.

	      Note: If windowLog is set to larger than 27, --long=windowLog or
	      --memory=windowSize needs to be passed to the decompressor.

       hashLog=hlog, hlog=hlog
	      Specify the maximum number of bits for a hash table.

	      Bigger  hash  tables  cause fewer collisions which usually makes
	      compression faster, but requires more memory during compression.

	      The minimum hlog is 6 (64 entries / 256 B) and the maximum is 30
	      (1B entries / 4 GiB).

       chainLog=clog, clog=clog
	      Specify  the  maximum  number  of	 bits for the secondary search
	      structure, whose form depends on the selected strategy.

	      Higher numbers of bits increases the  chance  to	find  a	 match
	      which  usually  improves	compression  ratio. It also slows down
	      compression speed and increases memory requirements for compres‐
	      sion.  This  option is ignored for the ZSTD_fast strategy, which
	      only has the primary hash table.

	      The minimum clog is 6 (64 entries / 256 B) and the maximum is 29
	      (512M  entries / 2 GiB) on 32-bit platforms and 30 (1B entries /
	      4 GiB) on 64-bit platforms.

       searchLog=slog, slog=slog
	      Specify the maximum number of searches in a hash chain or a  bi‐
	      nary tree using logarithmic scale.

	      More searches increases the chance to find a match which usually
	      increases compression ratio but decreases compression speed.

	      The minimum slog is 1 and the maximum is 'windowLog' - 1.

       minMatch=mml, mml=mml
	      Specify the minimum searched length of a match in a hash table.

	      Larger search lengths usually decrease compression ratio but im‐
	      prove decompression speed.

	      The minimum mml is 3 and the maximum is 7.

       targetLength=tlen, tlen=tlen
	      The impact of this field vary depending on selected strategy.

	      For ZSTD_btopt, ZSTD_btultra and ZSTD_btultra2, it specifies the
	      minimum match length that causes match finder to stop searching.
	      A larger targetLength usually improves compression ratio but de‐
	      creases compression speed.

	      For ZSTD_fast, it triggers ultra-fast mode when > 0.  The	 value
	      represents  the  amount  of data skipped between match sampling.
	      Impact is reversed: a larger targetLength increases  compression
	      speed but decreases compression ratio.

	      For all other strategies, this field has no impact.

	      The minimum tlen is 0 and the maximum is 128 KiB.

       overlapLog=ovlog, ovlog=ovlog
	      Determine	 overlapSize,  amount  of  data reloaded from previous
	      job. This parameter is only available when multithreading is en‐
	      abled.  Reloading	 more data improves compression ratio, but de‐
	      creases speed.

	      The minimum ovlog is 0, and the maximum is 9. 1 means "no	 over‐
	      lap", hence completely independent jobs. 9 means "full overlap",
	      meaning up to windowSize is reloaded from previous job. Reducing
	      ovlog  by 1 reduces the reloaded amount by a factor 2. For exam‐
	      ple, 8 means "windowSize/2", and 6 means "windowSize/8". Value 0
	      is  special  and	means "default": ovlog is automatically deter‐
	      mined by zstd. In which case, ovlog will range from 6 to 9,  de‐
	      pending on selected strat.

       ldmHashLog=lhlog, lhlog=lhlog
	      Specify the maximum size for a hash table used for long distance
	      matching.

	      This option is ignored unless long distance matching is enabled.

	      Bigger hash tables usually improve compression ratio at the  ex‐
	      pense  of	 more memory during compression and a decrease in com‐
	      pression speed.

	      The minimum lhlog is 6 and the maximum is 30 (default: 20).

       ldmMinMatch=lmml, lmml=lmml
	      Specify the minimum searched length of a match for long distance
	      matching.

	      This option is ignored unless long distance matching is enabled.

	      Larger/very small values usually decrease compression ratio.

	      The minimum lmml is 4 and the maximum is 4096 (default: 64).

       ldmBucketSizeLog=lblog, lblog=lblog
	      Specify the size of each bucket for the hash table used for long
	      distance matching.

	      This option is ignored unless long distance matching is enabled.

	      Larger bucket sizes improve collision  resolution	 but  decrease
	      compression speed.

	      The minimum lblog is 1 and the maximum is 8 (default: 3).

       ldmHashRateLog=lhrlog, lhrlog=lhrlog
	      Specify  the  frequency  of inserting entries into the long dis‐
	      tance matching hash table.

	      This option is ignored unless long distance matching is enabled.

	      Larger values will improve compression speed. Deviating far from
	      the  default  value will likely result in a decrease in compres‐
	      sion ratio.

	      The default value is wlog - lhlog.

   Example
       The following parameters sets advanced compression options to something
       similar to predefined level 19 for files bigger than 256 KB:

       --zstd=wlog=23,clog=23,hlog=22,slog=6,mml=3,tlen=48,strat=6

   -B#:
       Specify the size of each compression job. This parameter is only avail‐
       able when multi-threading is enabled. Each compression job  is  run  in
       parallel,  so  this  value indirectly impacts the nb of active threads.
       Default job size varies depending on compression level (generally  4  *
       windowSize).  -B#  makes	 it possible to manually select a custom size.
       Note that job size must respect	a  minimum  value  which  is  enforced
       transparently. This minimum is either 512 KB, or overlapSize, whichever
       is largest. Different job sizes will lead to  non-identical  compressed
       frames.

DICTIONARY BUILDER
       zstd  offers  dictionary compression, which greatly improves efficiency
       on small files and messages. It's possible to train zstd with a set  of
       samples,	 the result of which is saved into a file called a dictionary.
       Then, during compression and decompression, reference the same  dictio‐
       nary,  using  command -D dictionaryFileName. Compression of small files
       similar to the sample set will be greatly improved.

       --train FILEs
	      Use FILEs as training set to create a dictionary.	 The  training
	      set  should ideally contain a lot of samples (> 100), and weight
	      typically 100x the target dictionary size (for example,  ~10  MB
	      for a 100 KB dictionary). --train can be combined with -r to in‐
	      dicate a directory rather than listing all the files, which  can
	      be useful to circumvent shell expansion limits.

	      Since  dictionary	 compression  is  mostly  effective  for small
	      files, the expectation is that the training set will  only  con‐
	      tain  small  files.  In the case where some samples happen to be
	      large, only the first 128 KiB of these samples will be used  for
	      training.

	      --train supports multithreading if zstd is compiled with thread‐
	      ing support (default). Additional	 advanced  parameters  can  be
	      specified	 with --train-fastcover. The legacy dictionary builder
	      can be accessed with --train-legacy. The slower cover dictionary
	      builder  can  be accessed with --train-cover. Default --train is
	      equivalent to --train-fastcover=d=8,steps=4.

       -o FILE
	      Dictionary saved into FILE (default name: dictionary).

       --maxdict=#
	      Limit dictionary to specified size (default: 112640  bytes).  As
	      usual,  quantities  are  expressed in bytes by default, and it's
	      possible to employ suffixes (like KB or MB)  to  specify	larger
	      values.

       -#     Use  # compression level during training (optional). Will gener‐
	      ate statistics more tuned for selected  compression  level,  re‐
	      sulting in a small compression ratio improvement for this level.

       -B#    Split input files into blocks of size # (default: no split)

       -M#, --memory=#
	      Limit  the amount of sample data loaded for training (default: 2
	      GB). Note that the default (2 GB) is also the maximum. This  pa‐
	      rameter  can be useful in situations where the training set size
	      is not well controlled and  could	 be  potentially  very	large.
	      Since  speed  of	the training process is directly correlated to
	      the size of the training sample set, a smaller sample set	 leads
	      to faster training.

	      In situations where the training set is larger than maximum mem‐
	      ory, the CLI will randomly select samples	 among	the  available
	      ones,  up to the maximum allowed memory budget. This is meant to
	      improve dictionary relevance by mitigating the potential	impact
	      of  clustering,  such as selecting only files from the beginning
	      of a list sorted by modification date, or sorted by alphabetical
	      order.  The  randomization process is deterministic, so training
	      of the same list of files with the same parameters will lead  to
	      the creation of the same dictionary.

       --dictID=#
	      A	 dictionary  ID	 is  a locally unique ID. The decoder will use
	      this value to verify it is using the right  dictionary.  By  de‐
	      fault,  zstd will create a 4-bytes random number ID. It's possi‐
	      ble to provide an explicit number ID instead.  It's  up  to  the
	      dictionary  manager to not assign twice the same ID to 2 differ‐
	      ent dictionaries. Note that short numbers have an advantage:  an
	      ID  <  256 will only need 1 byte in the compressed frame header,
	      and an ID < 65536 will only need 2 bytes. This  compares	favor‐
	      ably to 4 bytes default.

	      Note  that RFC8878 reserves IDs less than 32768 and greater than
	      or equal to 2\^31, so they should not be used in public.

       --train-cover[=k#,d=#,steps=#,split=#,shrink[=#]]
	      Select parameters for the default dictionary  builder  algorithm
	      named  cover. If d is not specified, then it tries d = 6 and d =
	      8. If k is not specified, then it	 tries	steps  values  in  the
	      range  [50,  2000].  If steps is not specified, then the default
	      value of 40 is used. If split is not specified or	 split	<=  0,
	      then  the default value of 100 is used. Requires that d <= k. If
	      shrink flag is not used, then the default value  for  shrinkDict
	      of 0 is used. If shrink is not specified, then the default value
	      for shrinkDictMaxRegression of 1 is used.

	      Selects segments of size k with highest score to put in the dic‐
	      tionary.	The  score  of a segment is computed by the sum of the
	      frequencies of all the subsegments of size d. Generally d should
	      be in the range [6, 8], occasionally up to 16, but the algorithm
	      will run faster with d <= 8. Good values for k vary widely based
	      on  the  input data, but a safe range is [2 * d, 2000]. If split
	      is 100, all input samples are used for both training and testing
	      to  find	optimal	 d  and k to build dictionary. Supports multi‐
	      threading if zstd is compiled  with  threading  support.	Having
	      shrink  enabled takes a truncated dictionary of minimum size and
	      doubles in size until compression ratio of the truncated dictio‐
	      nary is at most shrinkDictMaxRegression% worse than the compres‐
	      sion ratio of the largest dictionary.

	      Examples:

	      zstd --train-cover FILEs

	      zstd --train-cover=k=50,d=8 FILEs

	      zstd --train-cover=d=8,steps=500 FILEs

	      zstd --train-cover=k=50 FILEs

	      zstd --train-cover=k=50,split=60 FILEs

	      zstd --train-cover=shrink FILEs

	      zstd --train-cover=shrink=2 FILEs

       --train-fastcover[=k#,d=#,f=#,steps=#,split=#,accel=#]
	      Same as cover but with extra parameters f and accel and  differ‐
	      ent  default  value  of split If split is not specified, then it
	      tries split = 75. If f is not specified, then it tries f	=  20.
	      Requires	that  0	 <  f < 32. If accel is not specified, then it
	      tries accel = 1. Requires that 0 < accel <= 10. Requires that  d
	      = 6 or d = 8.

	      f	 is log of size of array that keeps track of frequency of sub‐
	      segments of size d. The subsegment is hashed to an index in  the
	      range  [0,2^f  - 1]. It is possible that 2 different subsegments
	      are hashed to the same index, and they  are  considered  as  the
	      same  subsegment	when computing frequency. Using a higher f re‐
	      duces collision but takes longer.

	      Examples:

	      zstd --train-fastcover FILEs

	      zstd --train-fastcover=d=8,f=15,accel=2 FILEs

       --train-legacy[=selectivity=#]
	      Use legacy dictionary builder algorithm with the	given  dictio‐
	      nary  selectivity	 (default:  9).	 The  smaller  the selectivity
	      value, the denser the dictionary, improving its  efficiency  but
	      reducing its achievable maximum size. --train-legacy=s=# is also
	      accepted.

	      Examples:

	      zstd --train-legacy FILEs

	      zstd --train-legacy=selectivity=8 FILEs

BENCHMARK
       The zstd CLI provides a benchmarking mode that can be  used  to	easily
       find  suitable  compression parameters, or alternatively to benchmark a
       computer's performance. zstd -b [FILE(s)] will benchmark zstd for  both
       compression  and	 decompression	using  default compression level. Note
       that results are very dependent on the content being  compressed.  It's
       possible	 to pass multiple files to the benchmark, and even a directory
       with -r DIRECTORY. When no FILE is provided, the benchmark will	use  a
       procedurally generated lorem ipsum text.

       •   -b#: benchmark file(s) using compression level #

       •   -e#:	 benchmark file(s) using multiple compression levels, from -b#
	   to -e# (inclusive)

       •   -d:	benchmark  decompression  speed	 only  (requires  providing  a
	   zstd-compressed content)

       •   -i#:	 minimum  evaluation time, in seconds (default: 3s), benchmark
	   mode only

       •   -B#, --block-size=#: cut file(s) into independent chunks of size  #
	   (default: no chunking)

       •   -S:	output	one benchmark result per input file (default: consoli‐
	   dated result)

       •   -D dictionary benchmark using dictionary

       •   --priority=rt: set process priority to real-time (Windows)



       Beyond compression levels, benchmarking is also compatible  with	 other
       parameters,  such  as number of threads (-T#), advanced compression pa‐
       rameters (--zstd=###), dictionary compression (-D dictionary), or  even
       disabling checksum verification for example.

       Output Format: CompressionLevel#Filename: InputSize -> OutputSize (Com‐
       pressionRatio), CompressionSpeed, DecompressionSpeed

       Methodology: For speed measurement, the entire input is	compressed/de‐
       compressed  in-memory  to measure speed. A run lasts at least 1 sec, so
       when files are small, they are  compressed/decompressed	several	 times
       per run, in order to improve measurement accuracy.

SEE ALSO
       zstdgrep(1), zstdless(1), gzip(1), xz(1)

       The  zstandard format is specified in Y. Collet, "Zstandard Compression
       and	   the	       'application/zstd'	  Media		Type",
       https://www.ietf.org/rfc/rfc8878.txt,   Internet	  RFC  8878  (February
       2021).

BUGS
       Report bugs at: https://github.com/facebook/zstd/issues

AUTHOR
       Yann Collet



zstd 1.5.6			 October 2024			       ZSTD(1)

ZSTD(1)				 User Commands			       ZSTD(1)



NAME
       zstd  -	zstd,  zstdmt,	unzstd,	 zstdcat - Сжатие или распаковка файлов .zst

SYNOPSIS
       allbox; zstd [OPTIONS] [-   INPUT-FILE] [-o OUTPUT-FILE]

       zstdmt is equivalent to zstd -T0

       unzstd is equivalent to zstd -d

       zstdcat is equivalent to zstd -dcf

DESCRIPTION
       zstd является быстрым алгоритмом сжатия без потерь и инструментом сжатия данных,
       с синтаксисом командной строки, похожим на gzip(1) и xz(1). Он основан на семействе LZ77,
       с дополнительными этапами энтропии FSE и huff0. zstd предлагает высокую настройку скорости сжатия,
       от быстрых режимов более 200 МБ/с на ядро до сильных режимов с отличными коэффициентами сжатия.
       Он также имеет очень быстрый декодер, со скоростью более 500 МБ/с на ядро,
       которая остается примерно стабильной во всех настройках сжатия.

       Синтаксис командной строки zstd в целом похож на gzip, но имеет несколько отличий:

       •   Исходные файлы по умолчанию сохраняются. Их можно автоматически удалить с помощью команды --rm.

       •   При сжатии одного файла zstd по умолчанию отображает уведомления о прогрессе
	   и сводку результатов. Используйте -q, чтобы отключить их.

       •   zstd отображает краткую справочную страницу, если команда неверная. Используйте
	   -q, чтобы отключить это.

       •   zstd не принимает ввод из консоли, но принимает stdin, если это не консоль.

       •   zstd не сохраняет имя входного файла или его атрибуты, только его содержимое.



       zstd обрабатывает каждый файл в соответствии с выбранным режимом операции. Если файлы не указаны
       или указан файл -, zstd читает из стандартного ввода и записывает обработанные данные в стандартный вывод.
       zstd отказывается записывать сжатые данные в стандартный вывод, если это терминал: он выведет
       сообщение об ошибке и пропустит файл. Аналогично, zstd отказывается читать сжатые данные
       из стандартного ввода, если это терминал.

       Если не указан --stdout или -o, файлы записываются в новый файл,
       имя которого получается из имени исходного файла:

       •   При сжатии суффикс .zst добавляется к имени исходного файла,
	   чтобы получить имя целевого файла.

       •   При распаковке суффикс .zst удаляется из имени исходного файла,
	   чтобы получить имя целевого файла



   Конкатенация с файлами .zst
       Возможна конкатенация нескольких файлов .zst. zstd распакует
       такой объединенный файл, как будто это один файл .zst.

OPTIONS
   Суффиксы целых чисел и специальные значения
       В большинстве мест, где ожидается целочисленный аргумент, поддерживается необязательный суффикс
       для удобного указания больших целых чисел. Между целым числом и суффиксом не должно быть пробелов.

       KiB    Умножает целое число на 1 024 (2^10). Ki, K и KB принимаются как синонимы для KiB.

       MiB    Умножает целое число на 1 048 576 (2^20). Mi, M и MB принимаются как синонимы для MiB.

   Режим операции
       Если указано несколько опций режима операции, последняя вступает в силу.

       -z, --compress
	      Сжатие. Это режим операции по умолчанию, если ни одна опция режима не указана
	      и другой режим не подразумевается из имени команды (например, unzstd подразумевает --decompress).

       -d, --decompress, --uncompress
	      Распаковка.

       -t, --test
	      Проверка целостности сжатых файлов. Эта опция эквивалентна --decompress --stdout > /dev/null,
	      распакованные данные отбрасываются и проверяются на ошибки. Файлы не создаются или не удаляются.

       -b#    Тестирование производительности файла(ов) с уровнем сжатия #. См. BENCHMARK ниже
	      для описания этой операции.

       --train FILES
	      Использовать FILES в качестве набора для обучения для создания словаря. В набор для обучения
	      должно входить много небольших файлов (> 100). См. DICTIONARY BUILDER ниже для описания этой операции.

       -l, --list
	      Отобразить информацию, связанную с сжатым файлом zstd, такую как размер, коэффициент и контрольную сумму.
	      Некоторые из этих полей могут быть недоступны. Вывод этой команды можно расширить с помощью модификатора -v.

   Модификаторы операции
       •   -#: выбирает уровень сжатия # [1-19] (по умолчанию: 3). Более высокие уровни сжатия
	   обычно обеспечивают лучший коэффициент сжатия за счет скорости и памяти. Примерное правило:
	   скорость сжатия ожидается, что будет уменьшена в 2 раза каждые 2 уровня. Технически,
	   каждый уровень сопоставляется с набором продвинутых параметров (которые также можно изменить индивидуально,
	   см. ниже). Поскольку поведение компрессора сильно зависит от сжимаемого содержимого,
	   нет гарантии плавного перехода от одного уровня к другому.

       •   --ultra: разблокирует высокие уровни сжатия 20+ (максимум 22), используя гораздо больше памяти.
	   Обратите внимание, что для распаковки также потребуется больше памяти при использовании этих уровней.

       •   --fast[=#]: переключает на ультрабыстрые уровни сжатия. Если =# не указано,
	   по умолчанию используется 1. Чем выше значение, тем быстрее скорость сжатия,
	   за счет некоторого коэффициента сжатия. Эта настройка перезаписывает уровень сжатия,
	   если он был установлен ранее. Аналогично, если уровень сжатия установлен после --fast, он перезаписывает его.

       •   -T#, --threads=#: Сжатие с использованием # рабочих потоков (по умолчанию: 1). Если
	   # равно 0, попытка обнаружить и использовать количество физических ядер CPU.
	   Во всех случаях количество потоков ограничено ZSTDMT_NBWORKERS_MAX,
	   что составляет 64 в 32-разрядном режиме или 256 в 64-разрядных средах.
	   Этот модификатор ничего не делает, если zstd скомпилирован без поддержки многопоточности.

       •   --single-thread: Использовать один поток для ввода/выводы и сжатия.
	   Поскольку сжатие сериализуется с вводом/выводом, это может быть немного медленнее.
	   Режим одного потока имеет значительно меньшее использование памяти,
	   что может быть полезно для систем с ограниченным количеством памяти, таких как 32-разрядные системы.

	   Примечание 1: это единственный доступный режим, когда поддержка многопоточности отключена.

	   Примечание 2: этот режим отличается от -T1, который запускает 1 поток сжатия параллельно
	   с вводом/выводом. Итоговый сжатый результат также немного отличается от -T1.

       •   --auto-threads={physical,logical} (по умолчанию: physical): При использовании количества потоков по умолчанию через -T0,
	   выбирать значение на основе количества обнаруженных физических или логических ядер.

       •   --adapt[=min=#,max=#]: zstd будет динамически адаптировать уровень сжатия
	   к воспринимаемым условиям ввода/выводы. Адаптация уровня сжатия может быть наблюдаема в реальном времени
	   с помощью команды -v. Адаптация может быть ограничена между указанными минимальными и максимальными уровнями.
	   Эта функция работает при комбинации с многопоточностью и режимом --long. Она не работает с
	   --single-thread. По умолчанию устанавливает размер окна в 8 MiB (можно изменить вручную, см. wlog).
	   Из-за хаотической природы динамической адаптации, сжатый результат не воспроизводим.

	   Примечание: на момент написания, --adapt может застрять на низкой скорости при комбинации
	   с несколькими рабочими потоками (>=2).

       •   --long[=#]: включает поиск на большие расстояния с # windowLog, если # не указано,
	   по умолчанию используется 27. Это увеличивает размер окна (windowLog) и использование памяти
	   как для компрессора, так и для декомпрессора. Эта настройка предназначена для улучшения коэффициента сжатия
	   для файлов с длинными совпадениями на большом расстоянии.

	   Примечание: Если windowLog установлен больше, чем 27, декомпрессору нужно передать --long=windowLog или
	   --memory=windowSize.

       •   -D DICT: использовать DICT в качестве словаря для сжатия или распаковки FILE(ов)

       •   --patch-from FILE: Указать файл, используемый в качестве точки отсчета
	   для дифференциального движка zstd. Это эффективно сжатие со словарем с некоторыми удобными параметрами,
	   а именно, что windowSize > srcSize.

	   Примечание: нельзя использовать одновременно с -D.

	   Примечание: режим --long будет автоматически активирован, если chainLog < fileLog
	   (fileLog - это windowLog, необходимый для покрытия всего файла). Вы также можете принудительно активировать его.

	   Примечание: до уровня 15 вы можете использовать --patch-from в режиме --single-thread,
	   чтобы немного улучшить коэффициент сжатия за счет скорости.
	   Использование '--single-thread' выше уровня 15 приведет к худшему коэффициенту сжатия.

	   Примечание: для уровня 19 вы можете получить повышенный коэффициент сжатия за счет скорости,
	   указав --zstd=targetLength= что-то большое (например, 4096) и установив большое --zstd=chainLog=.

       •   --rsyncable: zstd будет периодически синхронизировать состояние сжатия,
	   чтобы сделать сжатый файл более совместимым с rsync. Влияние на коэффициент сжатия незначительное,
	   а на скорость сжатия - потенциальное, заметное на более высоких скоростях, например, при комбинации --rsyncable
	   с многими параллельными рабочими потоками. Эта функция не работает с --single-thread.
	   Вероятно, вы не захотите использовать ее с режимом длинного диапазона, поскольку это уменьшит эффективность
	   точек синхронизации, но результаты могут варьироваться.

       •   -C, --[no-]check: добавить проверку целостности, вычисленную из несжатых данных (по умолчанию: включено)

       •   --[no-]content-size: включить / отключить, сохраняется ли исходный размер файла в заголовке сжатого файла.
	   Опция по умолчанию --content-size (т.е. исходный размер будет размещен в заголовке).

       •   --no-dictID: не сохранять идентификатор словаря в заголовке кадра (сжатие со словарем).
	   Декодеру придется полагаться на неявные знания о том, какой словарь использовать, он не сможет проверить, правильный ли он.

       •   -M#, --memory=#: Установить лимит использования памяти. По умолчанию zstd использует
	   128 MiB для распаковки как максимальное количество памяти, которое декомпрессор может использовать,
	   но вы можете переопределить это вручную в любом направлении (т.е. увеличить или уменьшить).

	   Это также используется во время сжатия при использовании с --patch-from=.
	   В этом случае этот параметр переопределяет максимальный допустимый размер для словаря (128 MiB).

	   Кроме того, это можно использовать для ограничения памяти при обучении словаря.
	   Этот параметр переопределяет лимит по умолчанию в 2 GiB. zstd
	   загрузит образцы обучения до лимита памяти и игнорирует остальное.

       •   --stream-size=#: Устанавливает заявленный исходный размер ввода из потока.
	   Это значение должно быть точным, поскольку оно будет включено в заголовок созданного кадра.
	   Эта информация будет использоваться для лучшей оптимизации параметров сжатия,
	   что приведет к лучшему и потенциально более быстрому сжатию, особенно для меньших исходных размеров.

       •   --size-hint=#: При обработке ввода из потока, zstd должен угадывать,
	   насколько велик будет исходный размер при оптимизации параметров сжатия.
	   Если размер потока относительно мал, это предположение может быть плохим,
	   что приведет к более высокому коэффициенту сжатия, чем ожидалось.
	   Эта функция позволяет контролировать предположение, когда это необходимо. Точные предположения
	   приводят к лучшему коэффициенту сжатия. Переоценки приводят к небольшому ухудшению коэффициента сжатия,
	   в то время как недооценки могут привести к значительному ухудшению.

       •   --target-compressed-block-size=#:  Попытаться создать сжатые блоки примерно этого размера.
	   Это разобьет большие блоки, чтобы приблизиться к этой цели. Эта функция особенно полезна
	   для улучшения задержки, когда получатель может использовать получение ранних неполных данных.
	   Этот параметр определяет приблизительную цель: сжатые блоки будут стремиться к этому размеру "в среднем",
	   но отдельные блоки могут быть больше или меньше. Включение этой функции может уменьшить скорость сжатия
	   до ~10% на уровне 1. Более высокие уровни увидят меньшую относительную регрессию скорости,
	   становясь незаметной на более высоких настройках.

       •   -f, --force: отключить проверки ввода и вывода. Позволяет перезаписывать
	   существующие файлы, ввод из консоли, вывод в stdout, работу с ссылками, блочными устройствами и т.д.
	   Во время распаковки и когда место вывода - stdout, пропускать нераспознанные форматы как есть.

       •   -c, --stdout: писать в стандартный вывод (даже если это консоль);
	   сохранять исходные файлы (отключить --rm).

       •   -o FILE: сохранять результат в FILE. Обратите внимание, что эта операция конфликтует с -c.
	   Если обе операции присутствуют в командной строке, последняя побеждает.

       •   --[no-]sparse: включить / отключить поддержку разреженной ФС, чтобы файлы
	   с многими нулями были меньше на диске. Создание разреженных файлов может сэкономить место на диске
	   и ускорить распаковку за счет уменьшения количества операций ввода/выводы. По умолчанию: включено,
	   когда вывод в файл, и отключено, когда вывод в stdout. Эта настройка переопределяет значение по умолчанию
	   и может принудительно включить режим разреженности для stdout.

       •   --[no-]pass-through включить / отключить пропуск несжатых файлов как есть.
	   Во время распаковки, когда пропуск включен, нераспознанные форматы будут скопированы как есть
	   из ввода в вывод. По умолчанию пропуск происходит, когда место вывода - stdout и опция force (-f) установлена.

       •   --rm: удалить исходные файлы(ы) после успешного сжатия или распаковки.
	   Эта команда игнорируется молча, если вывод - stdout. Если используется в комбинации с -o,
	   вызывает запрос подтверждения (который можно отключить с -f), поскольку это деструктивная операция.

       •   -k, --keep: сохранять исходные файлы(ы) после успешного сжатия или распаковки.
	   Это поведение по умолчанию.

       •   -r: работать рекурсивно с каталогами. Выбирает все файлы в указанном каталоге
	   и всех его подкаталогах. Это может быть полезно как для сокращения ввода командной строки,
	   так и для обхода ограничений расширения оболочки, когда много файлов и именование превышает
	   максимальный размер командной строки.

       •   --filelist FILE читать список файлов для обработки из содержимого FILE.
	   Формат совместим с выводом ls, по одному файлу на строку.

       •   --output-dir-flat DIR: результирующие файлы сохраняются в целевом каталоге DIR,
	   вместо того же каталога, что и исходный файл. Обратите внимание, что эта команда
	   может вызвать проблемы с конфликтами имен, если несколько файлов из разных каталогов
	   заканчиваются одинаковым именем. Разрешение конфликтов обеспечивает, что первый файл с данным именем
	   будет присутствовать в DIR, а в комбинации с -f, последний файл будет присутствовать.

       •   --output-dir-mirror DIR: аналогично --output-dir-flat, выходные файлы сохраняются под целевым каталогом DIR,
	   но эта опция будет реплицировать иерархию входных каталогов в выходной DIR.

	   Если входной каталог содержит "..", файлы в этом каталоге будут игнорироваться.
	   Если входной каталог - абсолютный (т.е. "/var/tmp/abc"), он будет сохранен в "output-dir/var/tmp/abc".
	   Если несколько входных файлов или каталогов, разрешение конфликтов имен будет следовать тем же правилам,
	   что и --output-dir-flat.

       •   --format=FORMAT: сжимать и распаковывать в других форматах. Если скомпилировано с поддержкой,
	   zstd может сжимать в или распаковывать из форматов других алгоритмов сжатия.
	   Возможные варианты: zstd, gzip, xz, lzma и lz4. Если формат не указан, по умолчанию используется zstd.

       •   -h/-H, --help: отобразить справку/полную справку и выйти

       •   -V, --version: отобразить номер версии и немедленно выйти. Обратите внимание,
	   что, поскольку это выходит, флаги, указанные после -V, эффективно игнорируются.
	   Продвинутый: -vV также отображает поддерживаемые форматы. -vvV также отображает
	   поддержку POSIX. -qV отобразит только номер версии, подходящий для машинного чтения.

       •   -v, --verbose: режим подробного вывода, отображать больше информации

       •   -q, --quiet: подавлять предупреждения, интерактивность и уведомления.
	   Укажите дважды, чтобы подавить ошибки тоже.

       •   --no-progress: не отображать индикатор прогресса, но сохранять все другие сообщения.

       •   --show-default-cparams: показывает параметры сжатия по умолчанию,
	   которые будут использоваться для конкретного входного файла, на основе указанного уровня сжатия
	   и размера ввода. Если предоставленный файл не является обычным файлом (например, pipe),
	   этот флаг выведет параметры, используемые для входных данных неизвестного размера.

       •   --exclude-compressed: сжимать только файлы, которые еще не сжаты.

       •   --: Все аргументы после -- рассматриваются как файлы



   Модификаторы операции gzip
       При вызове через симлинк gzip, zstd будет поддерживать дополнительные опции,
       которые имитируют поведение gzip:

       -n, --no-name
	      не сохранять исходное имя файла и метки времени при сжатии файла.
	      Это поведение по умолчанию, поэтому это бессмысленно.

       --best псевдоним опции -9.

   Переменные окружения
       Использование переменных окружения для установки параметров имеет последствия для безопасности.
       Поэтому этот путь намеренно ограничен. В настоящее время поддерживаются только
       ZSTD_CLEVEL и ZSTD_NBTHREADS. Они устанавливают уровень сжатия по умолчанию
       и количество потоков для использования во время сжатия соответственно.

       ZSTD_CLEVEL можно использовать для установки уровня от 1 до 19 (нормальный диапазон).
       Если значение ZSTD_CLEVEL не является допустимым целым числом, оно будет игнорироваться
       с сообщением предупреждения. ZSTD_CLEVEL просто заменяет уровень сжатия по умолчанию (3).

       ZSTD_NBTHREADS можно использовать для установки количества потоков, которые zstd попытается использовать
       во время сжатия. Если значение ZSTD_NBTHREADS не является допустимым беззнаковым целым числом,
       оно будет игнорироваться с сообщением предупреждения.
       ZSTD_NBTHREADS имеет значение по умолчанию (1) и ограничено ZSTDMT_NBWORKERS_MAX==200.
       zstd должен быть скомпилирован с поддержкой многопоточности, чтобы эта переменная имела эффект.

       Оба могут быть переопределены соответствующими аргументами командной строки: -#
       для уровня сжатия и -T# для количества потоков сжатия.

ADVANCED COMPRESSION OPTIONS
       zstd предоставляет 22 предопределенных регулярных уровня сжатия плюс быстрые уровни.
       Уровень сжатия внутри переводится в несколько продвинутых параметров,
       которые управляют поведением компрессора (результат этого перевода можно наблюдать с --show-default-cparams).
       Эти продвинутые параметры можно переопределить с помощью продвинутых опций сжатия.

   --zstd[=options]:
       Опции предоставляются в виде списка, разделенного запятыми. Вы можете указать
       только опции, которые хотите изменить, а остальные будут взяты из выбранного или уровня сжатия по умолчанию.
       Список доступных опций:

       strategy=strat, strat=strat
	      Указать стратегию, используемую поисковиком совпадений.

	      Существует 9 стратегий, нумерованных от 1 до 9, от самой быстрой до самой сильной:
	      1=ZSTD_fast, 2=ZSTD_dfast, 3=ZSTD_greedy, 4=ZSTD_lazy, 5=ZSTD_lazy2, 6=ZSTD_btlazy2,
	      7=ZSTD_btopt, 8=ZSTD_btultra, 9=ZSTD_btultra2.

       windowLog=wlog, wlog=wlog
	      Указать максимальное количество бит для расстояния совпадения.

	      Более высокое число увеличивает шанс найти совпадение, что обычно улучшает коэффициент сжатия.
	      Это также увеличивает требования к памяти для компрессора и декомпрессора.
	      Минимальное wlog - 10 (1 КиБ), а максимальное - 30 (1 ГиБ) на 32-разрядных платформах
	      и 31 (2 ГиБ) на 64-разрядных платформах.

	      Примечание: Если windowLog установлен больше, чем 27, декомпрессору нужно передать --long=windowLog или
	      --memory=windowSize.

       hashLog=hlog, hlog=hlog
	      Указать максимальное количество бит для хэш-таблицы.

	      Большие хэш-таблицы вызывают меньше коллизий, что обычно ускоряет сжатие,
	      но требует больше памяти во время сжатия.

	      Минимальное hlog - 6 (64 записей / 256 Б), а максимальное - 30 (1B записей / 4 ГиБ).

       chainLog=clog, clog=clog
	      Указать максимальное количество бит для вторичной структуры поиска,
	      форма которой зависит от выбранной стратегии.

	      Более высокое число увеличивает шанс найти совпадение, что обычно улучшает коэффициент сжатия.
	      Это также замедляет сжатие и увеличивает требования к памяти для сжатия.
	      Эта опция игнорируется для стратегии ZSTD_fast, которая имеет только основную хэш-таблицу.

	      Минимальное clog - 6 (64 записей / 256 Б), а максимальное - 29 (512M записей / 2 ГиБ)
	      на 32-разрядных платформах и 30 (1B записей / 4 ГиБ) на 64-разрядных платформах.

       searchLog=slog, slog=slog
	      Указать максимальное количество поисков в цепочке хэша или двоичном дереве по логарифмической шкале.

	      Больше поисков увеличивает шанс найти совпадение, что обычно увеличивает коэффициент сжатия,
	      но уменьшает скорость сжатия.

	      Минимальное slog - 1, а максимальное - 'windowLog' - 1.

       minMatch=mml, mml=mml
	      Указать минимальную длину искомого совпадения в хэш-таблице.

	      Более длинные длины поиска обычно уменьшают коэффициент сжатия, но улучшают скорость распаковки.

	      Минимальное mml - 3, а максимальное - 7.

       targetLength=tlen, tlen=tlen
	      Влияние этого поля варьируется в зависимости от выбранной стратегии.

	      Для ZSTD_btopt, ZSTD_btultra и ZSTD_btultra2, оно указывает минимальную длину совпадения,
	      которая заставляет поисковик совпадений остановить поиск.
	      Более длинное targetLength обычно улучшает коэффициент сжатия, но уменьшает скорость сжатия.

	      Для ZSTD_fast, оно запускает ультрабыстрый режим, когда > 0. Значение
	      представляет количество пропущенных данных между выборками совпадений.
	      Влияние обратное: более длинное targetLength увеличивает скорость сжатия,
	      но уменьшает коэффициент сжатия.

	      Для всех других стратегий, это поле не имеет влияния.

	      Минимальное tlen - 0, а максимальное - 128 КиБ.

       overlapLog=ovlog, ovlog=ovlog
	      Определяет overlapSize, количество данных, загружаемых из предыдущей задачи.
	      Этот параметр доступен только при включенной многопоточности.
	      Загрузка большего количества данных улучшает коэффициент сжатия, но уменьшает скорость.

	      Минимальное ovlog - 0, а максимальное - 9. 1 означает "без перекрытия",
	      следовательно, полностью независимые задачи. 9 означает "полное перекрытие",
	      что означает загрузку до windowSize из предыдущей задачи. Уменьшение ovlog на 1 уменьшает
	      загружаемое количество в 2 раза. Например, 8 означает "windowSize/2", а 6 - "windowSize/8".
	      Значение 0 специальное и означает "по умолчанию": ovlog автоматически определяется zstd.
	      В этом случае ovlog будет варьироваться от 6 до 9, в зависимости от выбранной strat.

       ldmHashLog=lhlog, lhlog=lhlog
	      Указать максимальный размер для хэш-таблицы, используемой для поиска на большие расстояния.

	      Эта опция игнорируется, если поиск на большие расстояния не включен.

	      Большие хэш-таблицы обычно улучшают коэффициент сжатия за счет большего использования памяти
	      во время сжатия и уменьшения скорости сжатия.

	      Минимальное lhlog - 6, а максимальное - 30 (по умолчанию: 20).

       ldmMinMatch=lmml, lmml=lmml
	      Указать минимальную длину искомого совпадения для поиска на большие расстояния.

	      Эта опция игнорируется, если поиск на большие расстояния не включен.

	      Более большие/очень малые значения обычно уменьшают коэффициент сжатия.

	      Минимальное lmml - 4, а максимальное - 4096 (по умолчанию: 64).

       ldmBucketSizeLog=lblog, lblog=lblog
	      Указать размер каждого корзины для хэш-таблицы, используемой для поиска на большие расстояния.

	      Эта опция игнорируется, если поиск на большие расстояния не включен.

	      Более большие размеры корзин улучшают разрешение коллизий, но уменьшают скорость сжатия.

	      Минимальное lblog - 1, а максимальное - 8 (по умолчанию: 3).

       ldmHashRateLog=lhrlog, lhrlog=lhrlog
	      Указать частоту вставки записей в хэш-таблицу для поиска на большие расстояния.

	      Эта опция игнорируется, если поиск на большие расстояния не включен.

	      Более большие значения улучшат скорость сжатия. Сильное отклонение от
	      значения по умолчанию, вероятно, приведет к уменьшению коэффициента сжатия.

	      Значение по умолчанию - wlog - lhlog.

   Пример
       Следующие параметры устанавливают продвинутые опции сжатия, похожие на предопределенный уровень 19
       для файлов больше 256 КБ:

       --zstd=wlog=23,clog=23,hlog=22,slog=6,mml=3,tlen=48,strat=6

   -B#:
       Указать размер каждой задачи сжатия. Этот параметр доступен только при включенной многопоточности.
       Каждая задача сжатия выполняется параллельно, так что это значение косвенно влияет на количество активных потоков.
       Размер задачи по умолчанию варьируется в зависимости от уровня сжатия (обычно 4 * windowSize).
       -B# позволяет вручную выбрать пользовательский размер.
       Обратите внимание, что размер задачи должен соответствовать минимальному значению, которое принудительно применяется.
       Это минимум - 512 КБ или overlapSize, в зависимости от того, что больше.
       Разные размеры задач приведут к неидентичным сжатым кадрам.

DICTIONARY BUILDER
       zstd предлагает сжатие со словарем, что значительно улучшает эффективность
       для небольших файлов и сообщений. Возможна тренировка zstd на наборе образцов,
       результатом которой является файл, называемый словарем. Затем, во время сжатия и распаковки,
       ссылаться на тот же словарь с помощью команды -D dictionaryFileName.
       Сжатие небольших файлов, похожих на набор образцов, значительно улучшится.

       --train FILEs
	      Использовать FILEs в качестве набора для обучения для создания словаря. В набор для обучения
	      должно входить много образцов (> 100), и вес обычно в 100 раз больше целевого размера словаря
	      (например, ~10 МБ для словаря 100 КБ). --train можно комбинировать с -r для указания каталога,
	      вместо перечисления всех файлов, что полезно для обхода ограничений расширения оболочки.

	      Поскольку сжатие со словарем в основном эффективно для небольших файлов,
	      ожидается, что набор для обучения будет содержать только небольшие файлы.
	      В случае, если некоторые образцы окажутся большими, только первые 128 КиБ этих образцов будут использоваться
	      для обучения.

	      --train поддерживает многопоточность, если zstd скомпилирован с поддержкой потоков (по умолчанию).
	      Дополнительные продвинутые параметры можно указать с --train-fastcover.
	      Наследовательный построитель словарей можно получить с --train-legacy.
	      Более медленный построитель словарей cover можно получить с --train-cover.
	      --train по умолчанию эквивалентно --train-fastcover=d=8,steps=4.

       -o FILE
	      Словарь сохранен в FILE (имя по умолчанию: dictionary).

       --maxdict=#
	      Ограничить словарь указанным размером (по умолчанию: 112640 байт). Как обычно,
	      количества выражаются в байтах по умолчанию, и можно использовать суффиксы (как KB или MB),
	      чтобы указать большие значения.

       -#     Использовать # уровень сжатия во время обучения (опционально). Сгенерирует статистику,
	      более настроенную для выбранного уровня сжатия, что приведет к небольшому улучшению коэффициента сжатия для этого уровня.

       -B#    Разделить входные файлы на блоки размера # (по умолчанию: без разделения)

       -M#, --memory=#
	      Ограничить количество данных образцов, загружаемых для обучения (по умолчанию: 2 ГиБ).
	      Обратите внимание, что значение по умолчанию (2 ГиБ) также является максимальным. Этот параметр
	      может быть полезен в ситуациях, когда размер набора для обучения не контролируется
	      и может быть потенциально очень большим. Поскольку скорость процесса обучения напрямую коррелирует
	      с размером набора образцов, меньший набор приводит к более быстрому обучению.

	      В ситуациях, где набор для обучения больше максимальной памяти,
	      CLI случайным образом выберет образцы из доступных, до максимального допустимого бюджета памяти.
	      Это предназначено для улучшения релевантности словаря, смягчая потенциальное влияние
	      кластеризации, такое как выбор только файлов из начала списка, отсортированного по дате модификации,
	      или отсортированного в алфавитном порядке. Процесс рандомизации детерминирован,
	      так что обучение одного и того же списка файлов с одинаковыми параметрами приведет
	      к созданию одного и того же словаря.

       --dictID=#
	      Идентификатор словаря - локально уникальный идентификатор. Декодер будет использовать
	      это значение, чтобы убедиться, что он использует правильный словарь. По умолчанию zstd создаст
	      4-байтовое случайное число идентификатора. Возможна явная установка числа идентификатора.
	      Это зависит от менеджера словарей, чтобы не назначать один и тот же идентификатор двум разным словарям.
	      Обратите внимание, что короткие числа имеют преимущество: идентификатор < 256 будет нуждаться только в 1 байте
	      в заголовке сжатого кадра, а идентификатор < 65536 - только в 2 байтах. Это сравнивается благоприятно
	      с 4 байтами по умолчанию.

	      Обратите внимание, что RFC8878 резервирует идентификаторы меньше 32768 и больше или равные 2^31,
	      так что их не следует использовать в публичных целях.

       --train-cover[=k#,d=#,steps=#,split=#,shrink[=#]]
	      Выбрать параметры для алгоритма построителя словарей по умолчанию, называемого cover.
	      Если d не указано, то попробует d = 6 и d = 8. Если k не указано, то попробует значения steps
	      в диапазоне [50, 2000]. Если steps не указано, то используется значение по умолчанию 40.
	      Если split не указано или split <= 0, то используется значение по умолчанию 100.
	      Требует, чтобы d <= k. Если флаг shrink не используется, то используется значение по умолчанию для shrinkDict 0.
	      Если shrink не указано, то используется значение по умолчанию для shrinkDictMaxRegression 1.

	      Выбирает сегменты размера k с наивысшим баллом для размещения в словаре.
	      Балл сегмента вычисляется как сумма частот всех подсегментов размера d.
	      Обычно d должно быть в диапазоне [6, 8], иногда до 16, но алгоритм будет работать быстрее с d <= 8.
	      Хорошие значения для k сильно варьируются в зависимости от входных данных, но безопасный диапазон - [2 * d, 2000].
	      Если split = 100, все входные образцы используются как для обучения, так и для тестирования,
	      чтобы найти оптимальные d и k для построения словаря. Поддерживает многопоточность,
	      если zstd скомпилирован с поддержкой потоков. Включение shrink берет усеченный словарь минимального размера
	      и удваивает размер, пока коэффициент сжатия усеченного словаря не будет как минимум на shrinkDictMaxRegression%
	      хуже, чем коэффициент сжатия самого большого словаря.

	      Примеры:

	      zstd --train-cover FILEs

	      zstd --train-cover=k=50,d=8 FILEs

	      zstd --train-cover=d=8,steps=500 FILEs

	      zstd --train-cover=k=50 FILEs

	      zstd --train-cover=k=50,split=60 FILEs

	      zstd --train-cover=shrink FILEs

	      zstd --train-cover=shrink=2 FILEs

       --train-fastcover[=k#,d=#,f=#,steps=#,split=#,accel=#]
	      То же, что и cover, но с дополнительными параметрами f и accel и другим значением split по умолчанию.
	      Если split не указано, то попробует split = 75. Если f не указано, то попробует f = 20.
	      Требует, чтобы 0 < f < 32. Если accel не указано, то попробует accel = 1.
	      Требует, чтобы 0 < accel <= 10. Требует, чтобы d = 6 или d = 8.

	      f - логарифм размера массива, который отслеживает частоту подсегментов размера d.
	      Подсегмент хэшируется в индекс в диапазоне [0, 2^f - 1]. Возможны,
	      что 2 разных подсегмента хэшируются в один и тот же индекс, и они рассматриваются как один и тот же подсегмент
	      при вычислении частоты. Использование большего f уменьшает коллизии, но занимает больше времени.

	      Примеры:

	      zstd --train-fastcover FILEs

	      zstd --train-fastcover=d=8,f=15,accel=2 FILEs

       --train-legacy[=selectivity=#]
	      Использовать алгоритм построителя словарей legacy с заданной
	      селективностью словаря (по умолчанию: 9). Чем меньше значение селективности,
	      тем плотнее словарь, улучшая его эффективность, но уменьшая его достижимый максимальный размер.
	      --train-legacy=s=# также принимается.

	      Примеры:

	      zstd --train-legacy FILEs

	      zstd --train-legacy=selectivity=8 FILEs

BENCHMARK
       zstd CLI предоставляет режим тестирования производительности, который можно использовать
       для легкого поиска подходящих параметров сжатия или для тестирования производительности компьютера.
       zstd -b [FILE(s)] протестирует zstd для сжатия и распаковки с использованием уровня сжатия по умолчанию.
       Обратите внимание, что результаты сильно зависят от сжимаемого содержимого. Возможна передача
       нескольких файлов для тестирования, а также каталога с -r DIRECTORY.
       Если FILE не предоставлено, тестирование будет использовать процедурно сгенерированный текст lorem ipsum.

       •   -b#: протестировать файл(ы) с уровнем сжатия #

       •   -e#: протестировать файл(ы) с несколькими уровнями сжатия, от -b# до -e# (включительно)

       •   -d: протестировать только скорость распаковки (требует предоставления сжатого содержимого zstd)

       •   -i#: минимальное время оценки, в секундах (по умолчанию: 3с), только для режима тестирования

       •   -B#, --block-size=#: разделить файл(ы) на независимые фрагменты размера #

       •   -S: вывести один результат тестирования на входной файл (по умолчанию: консолидированный результат)

       •   -D dictionary протестировать с использованием словаря

       •   --priority=rt: установить приоритет процесса на реальное время (Windows)



       Помимо уровней сжатия, тестирование также совместимо с другими параметрами,
       такими как количество потоков (-T#), продвинутыми параметрами сжатия (--zstd=###),
       сжатием со словарем (-D dictionary) или даже отключением проверки контрольной суммы, например.

       Формат вывода: CompressionLevel#Filename: InputSize -> OutputSize (CompressionRatio), CompressionSpeed, DecompressionSpeed

       Методология: Для измерения скорости весь ввод сжимается/распаковывается в памяти.
       Запуск длится как минимум 1 секунду, так что при небольших файлах они сжимаются/распаковываются
       несколько раз за запуск, чтобы улучшить точность измерения.

SEE ALSO
       zstdgrep(1), zstdless(1), gzip(1), xz(1)

       Формат zstandard указан в Y. Collet, "Zstandard Compression
       and	   the      'application/zstd'     Media     Type",
       https://www.ietf.org/rfc/rfc8878.txt, Internet RFC 8878 (February 2021).

BUGS
       Сообщить об ошибках: https://github.com/facebook/zstd/issues

AUTHOR
       Yann Collet



zstd 1.5.6			 October 2024			       ZSTD(1)
ZSTD(1)				 User Commands			       ZSTD(1)



NAME
       zstd  -	zstd,  zstdmt,	unzstd,	 zstdcat - Compress or decompress .zst
       files

SYNOPSIS
       allbox; zstd [OPTIONS] [-   INPUT-FILE] [-o OUTPUT-FILE]

       zstdmt is equivalent to zstd -T0

       unzstd is equivalent to zstd -d

       zstdcat is equivalent to zstd -dcf

DESCRIPTION
       zstd is a fast lossless	compression  algorithm	and  data  compression
       tool,  with  command  line  syntax  similar to gzip(1) and xz(1). It is
       based on the LZ77 family, with further FSE & huff0 entropy stages. zstd
       offers  highly configurable compression speed, from fast modes at > 200
       MB/s per core, to strong modes with excellent  compression  ratios.  It
       also  features  a  very	fast decoder, with speeds > 500 MB/s per core,
       which remains roughly stable at all compression settings.

       zstd command line syntax is generally similar to gzip, but features the
       following few differences:

       •   Source files are preserved by default. It's possible to remove them
	   automatically by using the --rm command.

       •   When compressing a single file, zstd	 displays  progress  notifica‐
	   tions and result summary by default. Use -q to turn them off.

       •   zstd	 displays a short help page when command line is an error. Use
	   -q to turn it off.

       •   zstd does not accept input from  console,  though  it  does	accept
	   stdin when it's not the console.

       •   zstd	 does  not  store the input's filename or attributes, only its
	   contents.



       zstd processes each file according to the selected operation  mode.  If
       no  files  are  given  or file is -, zstd reads from standard input and
       writes the processed data to standard output. zstd will refuse to write
       compressed data to standard output if it is a terminal: it will display
       an error message and skip the file. Similarly, zstd will refuse to read
       compressed data from standard input if it is a terminal.

       Unless  --stdout	 or  -o	 is specified, files are written to a new file
       whose name is derived from the source file name:

       •   When compressing, the suffix .zst is appended to the	 source	 file‐
	   name to get the target filename.

       •   When	 decompressing,	 the  .zst  suffix  is removed from the source
	   filename to get the target filename



   Concatenation with .zst Files
       It is possible to concatenate multiple .zst files. zstd will decompress
       such agglomerated file as if it was a single .zst file.

OPTIONS
   Integer Suffixes and Special Values
       In  most places where an integer argument is expected, an optional suf‐
       fix is supported to easily indicate large integers. There  must	be  no
       space between the integer and the suffix.

       KiB    Multiply	the  integer  by  1,024 (2\^10). Ki, K, and KB are ac‐
	      cepted as synonyms for KiB.

       MiB    Multiply the integer by 1,048,576 (2\^20). Mi, M, and MB are ac‐
	      cepted as synonyms for MiB.

   Operation Mode
       If  multiple  operation	mode options are given, the last one takes ef‐
       fect.

       -z, --compress
	      Compress. This is the default operation mode when	 no  operation
	      mode  option is specified and no other operation mode is implied
	      from the command name  (for  example,  unzstd  implies  --decom‐
	      press).

       -d, --decompress, --uncompress
	      Decompress.

       -t, --test
	      Test  the	 integrity of compressed files. This option is equiva‐
	      lent to --decompress --stdout > /dev/null, decompressed data  is
	      discarded	 and  checksummed  for errors. No files are created or
	      removed.

       -b#    Benchmark file(s) using compression level #. See BENCHMARK below
	      for a description of this operation.

       --train FILES
	      Use FILES as a training set to create a dictionary. The training
	      set should contain a lot of small files (> 100). See  DICTIONARY
	      BUILDER below for a description of this operation.

       -l, --list
	      Display  information  related to a zstd compressed file, such as
	      size, ratio, and checksum. Some  of  these  fields  may  not  be
	      available.  This	command's  output can be augmented with the -v
	      modifier.

   Operation Modifiers
       •   -#: selects # compression level [1-19] (default:  3).  Higher  com‐
	   pression  levels  generally produce higher compression ratio at the
	   expense of speed and memory. A rough rule of thumb is that compres‐
	   sion	 speed	is expected to be divided by 2 every 2 levels. Techni‐
	   cally, each level is mapped to a set of advanced  parameters	 (that
	   can also be modified individually, see below). Because the compres‐
	   sor's behavior highly depends on the content to  compress,  there's
	   no guarantee of a smooth progression from one level to another.

       •   --ultra:  unlocks high compression levels 20+ (maximum 22), using a
	   lot more memory. Note that decompression  will  also	 require  more
	   memory when using these levels.

       •   --fast[=#]:	switch	to ultra-fast compression levels. If =# is not
	   present, it defaults to 1. The higher the  value,  the  faster  the
	   compression speed, at the cost of some compression ratio. This set‐
	   ting overwrites compression level if one was set previously.	 Simi‐
	   larly, if a compression level is set after --fast, it overrides it.

       •   -T#, --threads=#: Compress using # working threads (default: 1). If
	   # is 0, attempt to detect and use the number of physical CPU cores.
	   In  all cases, the nb of threads is capped to ZSTDMT_NBWORKERS_MAX,
	   which is either 64 in 32-bit mode, or 256 for 64-bit	 environments.
	   This	 modifier does nothing if zstd is compiled without multithread
	   support.

       •   --single-thread: Use a single thread for both I/O and  compression.
	   As compression is serialized with I/O, this can be slightly slower.
	   Single-thread mode features significantly lower memory usage, which
	   can	be  useful  for systems with limited amount of memory, such as
	   32-bit systems.

	   Note 1: this mode is the only available one when  multithread  sup‐
	   port is disabled.

	   Note 2: this mode is different from -T1, which spawns 1 compression
	   thread in parallel  with  I/O.  Final  compressed  result  is  also
	   slightly different from -T1.

       •   --auto-threads={physical,logical} (default: physical): When using a
	   default amount of threads via -T0, choose the default based on  the
	   number of detected physical or logical cores.

       •   --adapt[=min=#,max=#]:  zstd	 will  dynamically  adapt  compression
	   level to perceived I/O conditions. Compression level adaptation can
	   be observed live by using command -v. Adaptation can be constrained
	   between supplied min and max levels. The feature  works  when  com‐
	   bined  with	multi-threading and --long mode. It does not work with
	   --single-thread. It sets window size to 8 MiB by  default  (can  be
	   changed  manually,  see wlog). Due to the chaotic nature of dynamic
	   adaptation, compressed result is not reproducible.

	   Note: at the time of this writing, --adapt can remain stuck at  low
	   speed when combined with multiple worker threads (>=2).

       •   --long[=#]:	enables	 long distance matching with # windowLog, if #
	   is not present it defaults to 27. This increases  the  window  size
	   (windowLog) and memory usage for both the compressor and decompres‐
	   sor. This setting is designed to improve the compression ratio  for
	   files with long matches at a large distance.

	   Note:  If  windowLog	 is set to larger than 27, --long=windowLog or
	   --memory=windowSize needs to be passed to the decompressor.

       •   -D DICT: use DICT as Dictionary to compress or decompress FILE(s)

       •   --patch-from FILE: Specify the file to be used as a reference point
	   for	zstd's diff engine. This is effectively dictionary compression
	   with some convenient parameter selection, namely that windowSize  >
	   srcSize.

	   Note: cannot use both this and -D together.

	   Note:  --long  mode	will  be automatically activated if chainLog <
	   fileLog (fileLog being the windowLog required to  cover  the	 whole
	   file). You can also manually force it.

	   Note:  up  to level 15, you can use --patch-from in --single-thread
	   mode to improve compression ratio marginally at the cost of	speed.
	   Using  '--single-thread' above level 15 will lead to lower compres‐
	   sion ratios.

	   Note: for level 19, you can get increased compression ratio at  the
	   cost	 of  speed  by specifying --zstd=targetLength= to be something
	   large (i.e. 4096), and by setting a large --zstd=chainLog=.

       •   --rsyncable: zstd will  periodically	 synchronize  the  compression
	   state  to  make the compressed file more rsync-friendly. There is a
	   negligible impact to compression ratio, and a potential  impact  to
	   compression	speed,	perceptible at higher speeds, for example when
	   combining --rsyncable with many parallel worker threads. This  fea‐
	   ture does not work with --single-thread. You probably don't want to
	   use it with long range mode, since it will decrease the  effective‐
	   ness of the synchronization points, but your mileage may vary.

       •   -C,	--[no-]check:  add  integrity check computed from uncompressed
	   data (default: enabled)

       •   --[no-]content-size: enable / disable whether or not	 the  original
	   size	 of  the  file is placed in the header of the compressed file.
	   The default option is --content-size	 (meaning  that	 the  original
	   size will be placed in the header).

       •   --no-dictID:	 do  not store dictionary ID within frame header (dic‐
	   tionary compression). The decoder will have	to  rely  on  implicit
	   knowledge  about which dictionary to use, it won't be able to check
	   if it's correct.

       •   -M#, --memory=#: Set a memory usage limit. By  default,  zstd  uses
	   128	MiB  for decompression as the maximum amount of memory the de‐
	   compressor is allowed to use, but you can override this manually if
	   need be in either direction (i.e. you can increase or decrease it).

	   This is also used during compression when using with --patch-from=.
	   In this case, this parameter overrides that	maximum	 size  allowed
	   for a dictionary. (128 MiB).

	   Additionally,  this	can  be	 used  to  limit memory for dictionary
	   training. This parameter overrides the default limit of 2 GiB. zstd
	   will	 load  training	 samples up to the memory limit and ignore the
	   rest.

       •   --stream-size=#: Sets the pledged source size of input coming  from
	   a  stream.  This value must be exact, as it will be included in the
	   produced frame header. Incorrect stream sizes will cause an	error.
	   This information will be used to better optimize compression param‐
	   eters, resulting in better and potentially faster compression,  es‐
	   pecially for smaller source sizes.

       •   --size-hint=#:  When	 handling input from a stream, zstd must guess
	   how large the source size will be when optimizing  compression  pa‐
	   rameters. If the stream size is relatively small, this guess may be
	   a poor one, resulting in a higher compression ratio than  expected.
	   This	 feature  allows  for controlling the guess when needed. Exact
	   guesses result in better compression ratios.	 Overestimates	result
	   in  slightly	 degraded compression ratios, while underestimates may
	   result in significant degradation.

       •   --target-compressed-block-size=#:  Attempt  to  produce  compressed
	   blocks of approximately this size. This will split larger blocks in
	   order to approach this target. This feature is notably  useful  for
	   improved  latency,  when  the receiver can leverage receiving early
	   incomplete data. This parameter defines a loose target:  compressed
	   blocks  will	 target	 this size "on average", but individual blocks
	   can still be larger or smaller. Enabling this feature can  decrease
	   compression	speed by up to ~10% at level 1. Higher levels will see
	   smaller relative speed regression,  becoming	 invisible  at	higher
	   settings.

       •   -f,	--force:  disable  input and output checks. Allows overwriting
	   existing files, input from console, output to stdout, operating  on
	   links, block devices, etc. During decompression and when the output
	   destination is stdout, pass-through unrecognized formats as-is.

       •   -c, --stdout: write to standard output (even if it is the console);
	   keep original files (disable --rm).

       •   -o FILE: save result into FILE. Note that this operation is in con‐
	   flict with -c. If both operations are present on the command	 line,
	   the last expressed one wins.

       •   --[no-]sparse:  enable  /  disable sparse FS support, to make files
	   with many zeroes smaller on disk. Creating sparse  files  may  save
	   disk	 space	and  speed  up decompression by reducing the amount of
	   disk I/O. default: enabled when output is into a file, and disabled
	   when output is stdout. This setting overrides default and can force
	   sparse mode over stdout.

       •   --[no-]pass-through enable / disable passing	 through  uncompressed
	   files as-is. During decompression when pass-through is enabled, un‐
	   recognized formats will be copied as-is from the input to the  out‐
	   put.	 By  default, pass-through will occur when the output destina‐
	   tion is stdout and the force (-f) option is set.

       •   --rm: remove source file(s) after successful compression or	decom‐
	   pression.  This command is silently ignored if output is stdout. If
	   used in combination with -o, triggers a confirmation prompt	(which
	   can be silenced with -f), as this is a destructive operation.

       •   -k, --keep: keep source file(s) after successful compression or de‐
	   compression. This is the default behavior.

       •   -r: operate recursively on directories. It selects all files in the
	   named directory and all its subdirectories. This can be useful both
	   to reduce command line typing, and to  circumvent  shell  expansion
	   limitations,	 when  there  are a lot of files and naming breaks the
	   maximum size of a command line.

       •   --filelist FILE read a list of files to  process  as	 content  from
	   FILE. Format is compatible with ls output, with one file per line.

       •   --output-dir-flat  DIR:  resulting files are stored into target DIR
	   directory, instead of same directory as origin file. Be aware  that
	   this	 command  can  introduce  name	collision  issues, if multiple
	   files, from different directories, end up  having  the  same	 name.
	   Collision  resolution  ensures first file with a given name will be
	   present in DIR, while in combination with -f, the last file will be
	   present instead.

       •   --output-dir-mirror	DIR:  similar to --output-dir-flat, the output
	   files are stored underneath target DIR directory, but  this	option
	   will replicate input directory hierarchy into output DIR.

	   If  input directory contains "..", the files in this directory will
	   be ignored. If input	 directory  is	an  absolute  directory	 (i.e.
	   "/var/tmp/abc"),    it    will    be	   stored   into   the	 "out‐
	   put-dir/var/tmp/abc". If there are multiple input files or directo‐
	   ries,  name	collision  resolution  will  follow  the same rules as
	   --output-dir-flat.

       •   --format=FORMAT: compress and decompress in other formats. If  com‐
	   piled  with	support, zstd can compress to or decompress from other
	   compression algorithm formats. Possibly available options are zstd,
	   gzip, xz, lzma, and lz4. If no such format is provided, zstd is the
	   default.

       •   -h/-H, --help: display help/long help and exit

       •   -V, --version: display version number and  immediately  exit.  note
	   that,  since it exits, flags specified after -V are effectively ig‐
	   nored. Advanced: -vV also displays  supported  formats.  -vvV  also
	   displays  POSIX  support. -qV will only display the version number,
	   suitable for machine reading.

       •   -v, --verbose: verbose mode, display more information

       •   -q, --quiet: suppress warnings, interactivity,  and	notifications.
	   specify twice to suppress errors too.

       •   --no-progress:  do not display the progress bar, but keep all other
	   messages.

       •   --show-default-cparams: shows the  default  compression  parameters
	   that	 will  be  used for a particular input file, based on the pro‐
	   vided compression level and the input size. If the provided file is
	   not a regular file (e.g. a pipe), this flag will output the parame‐
	   ters used for inputs of unknown size.

       •   --exclude-compressed: only compress files that are not already com‐
	   pressed.

       •   --: All arguments after -- are treated as files



   gzip Operation Modifiers
       When invoked via a gzip symlink, zstd will support further options that
       intend to mimic the gzip behavior:

       -n, --no-name
	      do not store the original filename and timestamps when compress‐
	      ing a file. This is the default behavior and hence a no-op.

       --best alias to the option -9.

   Environment Variables
       Employing environment variables to set parameters has security implica‐
       tions.  Therefore,  this	 avenue	  is   intentionally   limited.	  Only
       ZSTD_CLEVEL  and	 ZSTD_NBTHREADS	 are currently supported. They set the
       default compression level and number of threads to use during  compres‐
       sion, respectively.

       ZSTD_CLEVEL can be used to set the level between 1 and 19 (the "normal"
       range). If the value of ZSTD_CLEVEL is not a valid integer, it will  be
       ignored	with  a warning message. ZSTD_CLEVEL just replaces the default
       compression level (3).

       ZSTD_NBTHREADS can be used to set the number of threads zstd  will  at‐
       tempt  to use during compression. If the value of ZSTD_NBTHREADS is not
       a valid unsigned integer, it will be ignored with  a  warning  message.
       ZSTD_NBTHREADS  has a default value of (1), and is capped at ZSTDMT_NB‐
       WORKERS_MAX==200. zstd must be compiled with  multithread  support  for
       this variable to have any effect.

       They can both be overridden by corresponding command line arguments: -#
       for compression level and -T# for number of compression threads.

ADVANCED COMPRESSION OPTIONS
       zstd provides 22 predefined regular compression levels  plus  the  fast
       levels.	A compression level is translated internally into multiple ad‐
       vanced parameters that control the behavior of the compressor (one  can
       observe	the  result  of this translation with --show-default-cparams).
       These advanced parameters can be overridden using advanced  compression
       options.

   --zstd[=options]:
       The  options  are  provided  as a comma-separated list. You may specify
       only the options you want to change and the rest will be taken from the
       selected or default compression level. The list of available options:

       strategy=strat, strat=strat
	      Specify a strategy used by a match finder.

	      There  are  9  strategies	 numbered from 1 to 9, from fastest to
	      strongest:     1=ZSTD_fast,     2=ZSTD_dfast,	3=ZSTD_greedy,
	      4=ZSTD_lazy,    5=ZSTD_lazy2,    6=ZSTD_btlazy2,	 7=ZSTD_btopt,
	      8=ZSTD_btultra, 9=ZSTD_btultra2.

       windowLog=wlog, wlog=wlog
	      Specify the maximum number of bits for a match distance.

	      The higher number of increases the chance to find a match	 which
	      usually improves compression ratio. It also increases memory re‐
	      quirements for the compressor and decompressor. The minimum wlog
	      is  10 (1 KiB) and the maximum is 30 (1 GiB) on 32-bit platforms
	      and 31 (2 GiB) on 64-bit platforms.

	      Note: If windowLog is set to larger than 27, --long=windowLog or
	      --memory=windowSize needs to be passed to the decompressor.

       hashLog=hlog, hlog=hlog
	      Specify the maximum number of bits for a hash table.

	      Bigger  hash  tables  cause fewer collisions which usually makes
	      compression faster, but requires more memory during compression.

	      The minimum hlog is 6 (64 entries / 256 B) and the maximum is 30
	      (1B entries / 4 GiB).

       chainLog=clog, clog=clog
	      Specify  the  maximum  number  of	 bits for the secondary search
	      structure, whose form depends on the selected strategy.

	      Higher numbers of bits increases the  chance  to	find  a	 match
	      which  usually  improves	compression  ratio. It also slows down
	      compression speed and increases memory requirements for compres‐
	      sion.  This  option is ignored for the ZSTD_fast strategy, which
	      only has the primary hash table.

	      The minimum clog is 6 (64 entries / 256 B) and the maximum is 29
	      (512M  entries / 2 GiB) on 32-bit platforms and 30 (1B entries /
	      4 GiB) on 64-bit platforms.

       searchLog=slog, slog=slog
	      Specify the maximum number of searches in a hash chain or a  bi‐
	      nary tree using logarithmic scale.

	      More searches increases the chance to find a match which usually
	      increases compression ratio but decreases compression speed.

	      The minimum slog is 1 and the maximum is 'windowLog' - 1.

       minMatch=mml, mml=mml
	      Specify the minimum searched length of a match in a hash table.

	      Larger search lengths usually decrease compression ratio but im‐
	      prove decompression speed.

	      The minimum mml is 3 and the maximum is 7.

       targetLength=tlen, tlen=tlen
	      The impact of this field vary depending on selected strategy.

	      For ZSTD_btopt, ZSTD_btultra and ZSTD_btultra2, it specifies the
	      minimum match length that causes match finder to stop searching.
	      A larger targetLength usually improves compression ratio but de‐
	      creases compression speed.

	      For ZSTD_fast, it triggers ultra-fast mode when > 0.  The	 value
	      represents  the  amount  of data skipped between match sampling.
	      Impact is reversed: a larger targetLength increases  compression
	      speed but decreases compression ratio.

	      For all other strategies, this field has no impact.

	      The minimum tlen is 0 and the maximum is 128 KiB.

       overlapLog=ovlog, ovlog=ovlog
	      Determine	 overlapSize,  amount  of  data reloaded from previous
	      job. This parameter is only available when multithreading is en‐
	      abled.  Reloading	 more data improves compression ratio, but de‐
	      creases speed.

	      The minimum ovlog is 0, and the maximum is 9. 1 means "no	 over‐
	      lap", hence completely independent jobs. 9 means "full overlap",
	      meaning up to windowSize is reloaded from previous job. Reducing
	      ovlog  by 1 reduces the reloaded amount by a factor 2. For exam‐
	      ple, 8 means "windowSize/2", and 6 means "windowSize/8". Value 0
	      is  special  and	means "default": ovlog is automatically deter‐
	      mined by zstd. In which case, ovlog will range from 6 to 9,  de‐
	      pending on selected strat.

       ldmHashLog=lhlog, lhlog=lhlog
	      Specify the maximum size for a hash table used for long distance
	      matching.

	      This option is ignored unless long distance matching is enabled.

	      Bigger hash tables usually improve compression ratio at the  ex‐
	      pense  of	 more memory during compression and a decrease in com‐
	      pression speed.

	      The minimum lhlog is 6 and the maximum is 30 (default: 20).

       ldmMinMatch=lmml, lmml=lmml
	      Specify the minimum searched length of a match for long distance
	      matching.

	      This option is ignored unless long distance matching is enabled.

	      Larger/very small values usually decrease compression ratio.

	      The minimum lmml is 4 and the maximum is 4096 (default: 64).

       ldmBucketSizeLog=lblog, lblog=lblog
	      Specify the size of each bucket for the hash table used for long
	      distance matching.

	      This option is ignored unless long distance matching is enabled.

	      Larger bucket sizes improve collision  resolution	 but  decrease
	      compression speed.

	      The minimum lblog is 1 and the maximum is 8 (default: 3).

       ldmHashRateLog=lhrlog, lhrlog=lhrlog
	      Specify  the  frequency  of inserting entries into the long dis‐
	      tance matching hash table.

	      This option is ignored unless long distance matching is enabled.

	      Larger values will improve compression speed. Deviating far from
	      the  default  value will likely result in a decrease in compres‐
	      sion ratio.

	      The default value is wlog - lhlog.

   Example
       The following parameters sets advanced compression options to something
       similar to predefined level 19 for files bigger than 256 KB:

       --zstd=wlog=23,clog=23,hlog=22,slog=6,mml=3,tlen=48,strat=6

   -B#:
       Specify the size of each compression job. This parameter is only avail‐
       able when multi-threading is enabled. Each compression job  is  run  in
       parallel,  so  this  value indirectly impacts the nb of active threads.
       Default job size varies depending on compression level (generally  4  *
       windowSize).  -B#  makes	 it possible to manually select a custom size.
       Note that job size must respect	a  minimum  value  which  is  enforced
       transparently. This minimum is either 512 KB, or overlapSize, whichever
       is largest. Different job sizes will lead to  non-identical  compressed
       frames.

DICTIONARY BUILDER
       zstd  offers  dictionary compression, which greatly improves efficiency
       on small files and messages. It's possible to train zstd with a set  of
       samples,	 the result of which is saved into a file called a dictionary.
       Then, during compression and decompression, reference the same  dictio‐
       nary,  using  command -D dictionaryFileName. Compression of small files
       similar to the sample set will be greatly improved.

       --train FILEs
	      Use FILEs as training set to create a dictionary.	 The  training
	      set  should ideally contain a lot of samples (> 100), and weight
	      typically 100x the target dictionary size (for example,  ~10  MB
	      for a 100 KB dictionary). --train can be combined with -r to in‐
	      dicate a directory rather than listing all the files, which  can
	      be useful to circumvent shell expansion limits.

	      Since  dictionary	 compression  is  mostly  effective  for small
	      files, the expectation is that the training set will  only  con‐
	      tain  small  files.  In the case where some samples happen to be
	      large, only the first 128 KiB of these samples will be used  for
	      training.

	      --train supports multithreading if zstd is compiled with thread‐
	      ing support (default). Additional	 advanced  parameters  can  be
	      specified	 with --train-fastcover. The legacy dictionary builder
	      can be accessed with --train-legacy. The slower cover dictionary
	      builder  can  be accessed with --train-cover. Default --train is
	      equivalent to --train-fastcover=d=8,steps=4.

       -o FILE
	      Dictionary saved into FILE (default name: dictionary).

       --maxdict=#
	      Limit dictionary to specified size (default: 112640  bytes).  As
	      usual,  quantities  are  expressed in bytes by default, and it's
	      possible to employ suffixes (like KB or MB)  to  specify	larger
	      values.

       -#     Use  # compression level during training (optional). Will gener‐
	      ate statistics more tuned for selected  compression  level,  re‐
	      sulting in a small compression ratio improvement for this level.

       -B#    Split input files into blocks of size # (default: no split)

       -M#, --memory=#
	      Limit  the amount of sample data loaded for training (default: 2
	      GB). Note that the default (2 GB) is also the maximum. This  pa‐
	      rameter  can be useful in situations where the training set size
	      is not well controlled and  could	 be  potentially  very	large.
	      Since  speed  of	the training process is directly correlated to
	      the size of the training sample set, a smaller sample set	 leads
	      to faster training.

	      In situations where the training set is larger than maximum mem‐
	      ory, the CLI will randomly select samples	 among	the  available
	      ones,  up to the maximum allowed memory budget. This is meant to
	      improve dictionary relevance by mitigating the potential	impact
	      of  clustering,  such as selecting only files from the beginning
	      of a list sorted by modification date, or sorted by alphabetical
	      order.  The  randomization process is deterministic, so training
	      of the same list of files with the same parameters will lead  to
	      the creation of the same dictionary.

       --dictID=#
	      A	 dictionary  ID	 is  a locally unique ID. The decoder will use
	      this value to verify it is using the right  dictionary.  By  de‐
	      fault,  zstd will create a 4-bytes random number ID. It's possi‐
	      ble to provide an explicit number ID instead.  It's  up  to  the
	      dictionary  manager to not assign twice the same ID to 2 differ‐
	      ent dictionaries. Note that short numbers have an advantage:  an
	      ID  <  256 will only need 1 byte in the compressed frame header,
	      and an ID < 65536 will only need 2 bytes. This  compares	favor‐
	      ably to 4 bytes default.

	      Note  that RFC8878 reserves IDs less than 32768 and greater than
	      or equal to 2\^31, so they should not be used in public.

       --train-cover[=k#,d=#,steps=#,split=#,shrink[=#]]
	      Select parameters for the default dictionary  builder  algorithm
	      named  cover. If d is not specified, then it tries d = 6 and d =
	      8. If k is not specified, then it	 tries	steps  values  in  the
	      range  [50,  2000].  If steps is not specified, then the default
	      value of 40 is used. If split is not specified or	 split	<=  0,
	      then  the default value of 100 is used. Requires that d <= k. If
	      shrink flag is not used, then the default value  for  shrinkDict
	      of 0 is used. If shrink is not specified, then the default value
	      for shrinkDictMaxRegression of 1 is used.

	      Selects segments of size k with highest score to put in the dic‐
	      tionary.	The  score  of a segment is computed by the sum of the
	      frequencies of all the subsegments of size d. Generally d should
	      be in the range [6, 8], occasionally up to 16, but the algorithm
	      will run faster with d <= 8. Good values for k vary widely based
	      on  the  input data, but a safe range is [2 * d, 2000]. If split
	      is 100, all input samples are used for both training and testing
	      to  find	optimal	 d  and k to build dictionary. Supports multi‐
	      threading if zstd is compiled  with  threading  support.	Having
	      shrink  enabled takes a truncated dictionary of minimum size and
	      doubles in size until compression ratio of the truncated dictio‐
	      nary is at most shrinkDictMaxRegression% worse than the compres‐
	      sion ratio of the largest dictionary.

	      Examples:

	      zstd --train-cover FILEs

	      zstd --train-cover=k=50,d=8 FILEs

	      zstd --train-cover=d=8,steps=500 FILEs

	      zstd --train-cover=k=50 FILEs

	      zstd --train-cover=k=50,split=60 FILEs

	      zstd --train-cover=shrink FILEs

	      zstd --train-cover=shrink=2 FILEs

       --train-fastcover[=k#,d=#,f=#,steps=#,split=#,accel=#]
	      Same as cover but with extra parameters f and accel and  differ‐
	      ent  default  value  of split If split is not specified, then it
	      tries split = 75. If f is not specified, then it tries f	=  20.
	      Requires	that  0	 <  f < 32. If accel is not specified, then it
	      tries accel = 1. Requires that 0 < accel <= 10. Requires that  d
	      = 6 or d = 8.

	      f	 is log of size of array that keeps track of frequency of sub‐
	      segments of size d. The subsegment is hashed to an index in  the
	      range  [0,2^f  - 1]. It is possible that 2 different subsegments
	      are hashed to the same index, and they  are  considered  as  the
	      same  subsegment	when computing frequency. Using a higher f re‐
	      duces collision but takes longer.

	      Examples:

	      zstd --train-fastcover FILEs

	      zstd --train-fastcover=d=8,f=15,accel=2 FILEs

       --train-legacy[=selectivity=#]
	      Use legacy dictionary builder algorithm with the	given  dictio‐
	      nary  selectivity	 (default:  9).	 The  smaller  the selectivity
	      value, the denser the dictionary, improving its  efficiency  but
	      reducing its achievable maximum size. --train-legacy=s=# is also
	      accepted.

	      Examples:

	      zstd --train-legacy FILEs

	      zstd --train-legacy=selectivity=8 FILEs

BENCHMARK
       The zstd CLI provides a benchmarking mode that can be  used  to	easily
       find  suitable  compression parameters, or alternatively to benchmark a
       computer's performance. zstd -b [FILE(s)] will benchmark zstd for  both
       compression  and	 decompression	using  default compression level. Note
       that results are very dependent on the content being  compressed.  It's
       possible	 to pass multiple files to the benchmark, and even a directory
       with -r DIRECTORY. When no FILE is provided, the benchmark will	use  a
       procedurally generated lorem ipsum text.

       •   -b#: benchmark file(s) using compression level #

       •   -e#:	 benchmark file(s) using multiple compression levels, from -b#
	   to -e# (inclusive)

       •   -d:	benchmark  decompression  speed	 only  (requires  providing  a
	   zstd-compressed content)

       •   -i#:	 minimum  evaluation time, in seconds (default: 3s), benchmark
	   mode only

       •   -B#, --block-size=#: cut file(s) into independent chunks of size  #
	   (default: no chunking)

       •   -S:	output	one benchmark result per input file (default: consoli‐
	   dated result)

       •   -D dictionary benchmark using dictionary

       •   --priority=rt: set process priority to real-time (Windows)



       Beyond compression levels, benchmarking is also compatible  with	 other
       parameters,  such  as number of threads (-T#), advanced compression pa‐
       rameters (--zstd=###), dictionary compression (-D dictionary), or  even
       disabling checksum verification for example.

       Output Format: CompressionLevel#Filename: InputSize -> OutputSize (Com‐
       pressionRatio), CompressionSpeed, DecompressionSpeed

       Methodology: For speed measurement, the entire input is	compressed/de‐
       compressed  in-memory  to measure speed. A run lasts at least 1 sec, so
       when files are small, they are  compressed/decompressed	several	 times
       per run, in order to improve measurement accuracy.

SEE ALSO
       zstdgrep(1), zstdless(1), gzip(1), xz(1)

       The  zstandard format is specified in Y. Collet, "Zstandard Compression
       and	   the	       'application/zstd'	  Media		Type",
       https://www.ietf.org/rfc/rfc8878.txt,   Internet	  RFC  8878  (February
       2021).

BUGS
       Report bugs at: https://github.com/facebook/zstd/issues

AUTHOR
       Yann Collet



zstd 1.5.6			 October 2024			       ZSTD(1)

ZSTD(1)				 User Commands			       ZSTD(1)



NAME
       zstd  -	zstd,  zstdmt,	unzstd,	 zstdcat - Сжатие или распаковка файлов
       .zst

SYNOPSIS
       allbox; zstd [OPTIONS] [-   INPUT-FILE] [-o OUTPUT-FILE]

       zstdmt is equivalent to zstd -T0

       unzstd is equivalent to zstd -d

       zstdcat is equivalent to zstd -dcf

DESCRIPTION
       zstd is a fast lossless compression algorithm and data compression
       tool, with command line syntax similar to gzip(1) and xz(1). It is
       based on the LZ77 family, with further FSE & huff0 entropy stages. zstd
       offers highly configurable compression speed, from fast modes at > 200
       MB/s per core, to strong modes with excellent compression ratios. It
       also features a very fast decoder, with speeds > 500 MB/s per core,
       which remains roughly stable at all compression settings.

       zstd command line syntax is generally similar to gzip, but features the
       following few differences:

       •   Source files are preserved by default. It's possible to remove them
	   automatically by using the --rm command.

       •   When compressing a single file, zstd displays progress notifica‐
	   tions and result summary by default. Use -q to turn them off.

       •   zstd displays a short help page when command line is an error. Use
	   -q to turn it off.

       •   zstd does not accept input from console, though it does accept
	   stdin when it's not the console.

       •   zstd does not store the input's filename or attributes, only its
	   contents.



       zstd processes each file according to the selected operation mode. If
       no files are given or file is -, zstd reads from standard input and
       writes the processed data to standard output. zstd will refuse to write
       compressed data to standard output if it is a terminal: it will display
       an error message and skip the file. Similarly, zstd will refuse to read
       compressed data from standard input if it is a terminal.

       Unless --stdout or -o is specified, files are written to a new file
       whose name is derived from the source file name:

       •   When compressing, the suffix .zst is appended to the source file‐
	   name to get the target filename.

       •   When decompressing, the .zst suffix is removed from the source
	   filename to get the target filename



   Сцепление с файлами .zst
       It is possible to concatenate multiple .zst files. zstd will decompress
       such agglomerated file as if it was a single .zst file.

OPTIONS
   Integer Suffixes and Special Values
       In most places where an integer argument is expected, an optional suf‐
       fix is supported to easily indicate large integers. There must be no
       space between the integer and the suffix.

       KiB    Multiply the integer by 1,024 (2\^10). Ki, K, and KB are ac‐
	      cepted as synonyms for KiB.

       MiB    Multiply the integer by 1,048,576 (2\^20). Mi, M, and MB are ac‐
	      cepted as synonyms for MiB.

   Operation Mode
       If multiple operation mode options are given, the last one takes ef‐
       fect.

       -z, --compress
	      Compress. This is the default operation mode when no operation
	      mode option is specified and no other operation mode is implied
	      from the command name (for example, unzstd implies --decom‐
	      press).

       -d, --decompress, --uncompress
	      Decompress.

       -t, --test
	      Test the integrity of compressed files. This option is equiva‐
	      lent to --decompress --stdout > /dev/null, decompressed data is
	      discarded and checksummed for errors. No files are created or
	      removed.

       -b#    Benchmark file(s) using compression level #. See BENCHMARK below
	      for a description of this operation.

       --train FILES
	      Use FILES as a training set to create a dictionary. The training
	      set should contain a lot of small files (> 100). See DICTIONARY
	      BUILDER below for a description of this operation.

       -l, --list
	      Display information related to a zstd compressed file, such as
	      size, ratio, and checksum. Some of these fields may not be
	      available. This command's output can be augmented with the -v
	      modifier.

   Operation Modifiers
       •   -#: selects # compression level [1-19] (default: 3). Higher com‐
	   pression levels generally produce higher compression ratio at the
	   expense of speed and memory. A rough rule of thumb is that compres‐
	   sion speed is expected to be divided by 2 every 2 levels. Techni‐
	   cally, each level is mapped to a set of advanced parameters (that
	   can also be modified individually, see below). Because the compres‐
	   sor's behavior highly depends on the content to compress, there's
	   no guarantee of a smooth progression from one level to another.

       •   --ultra: unlocks high compression levels 20+ (maximum 22), using a
	   lot more memory. Note that decompression will also require more
	   memory when using these levels.

       •   --fast[=#]: switch to ultra-fast compression levels. If =# is not
	   present, it defaults to 1. The higher the value, the faster the
	   compression speed, at the cost of some compression ratio. This set‐
	   ting overwrites compression level if one was set previously. Simi‐
	   larly, if a compression level is set after --fast, it overrides it.

       •   -T#, --threads=#: Compress using # working threads (default: 1). If
	   # is 0, attempt to detect and use the number of physical CPU cores.
	   In all cases, the nb of threads is capped to ZSTDMT_NBWORKERS_MAX,
	   which is either 64 in 32-bit mode, or 256 for 64-bit environments.
	   This modifier does nothing if zstd is compiled without multithread
	   support.

       •   --single-thread: Use a single thread for both I/O and compression.
	   As compression is serialized with I/O, this can be slightly slower.
	   Single-thread mode features significantly lower memory usage, which
	   can be useful for systems with limited amount of memory, such as
	   32-bit systems.

	   Note 1: this mode is the only available one when multithread sup‐
	   port is disabled.

	   Note 2: this mode is different from -T1, which spawns 1 compression
	   thread in parallel with I/O. Final compressed result is also
	   slightly different from -T1.

       •   --auto-threads={physical,logical} (default: physical): When using a
	   default amount of threads via -T0, choose the default based on the
	   number of detected physical or logical cores.

       •   --adapt[=min=#,max=#]: zstd will dynamically adapt compression
	   level to perceived I/O conditions. Compression level adaptation can
	   be observed live by using command -v. Adaptation can be constrained
	   between supplied min and max levels. The feature works when com‐
	   bined with multi-threading and --long mode. It does not work with
	   --single-thread. It sets window size to 8 MiB by default (can be
	   changed manually, see wlog). Due to the chaotic nature of dynamic
	   adaptation, compressed result is not reproducible.

	   Note: at the time of this writing, --adapt can remain stuck at low
	   speed when combined with multiple worker threads (>=2).

       •   --long[=#]: enables long distance matching with # windowLog, if #
	   is not present it defaults to 27. This increases the window size
	   (windowLog) and memory usage for both the compressor and decompres‐
	   sor. This setting is designed to improve the compression ratio for
	   files with long matches at a large distance.

	   Note: If windowLog is set to larger than 27, --long=windowLog or
	   --memory=windowSize needs to be passed to the decompressor.

       •   -D DICT: use DICT as Dictionary to compress or decompress FILE(s)

       •   --patch-from FILE: Specify the file to be used as a reference point
	   for zstd's diff engine. This is effectively dictionary compression
	   with some convenient parameter selection, namely that windowSize >
	   srcSize.

	   Note: cannot use both this and -D together.

	   Note: --long mode will be automatically activated if chainLog <
	   fileLog (fileLog being the windowLog required to cover the whole
	   file). You can also manually force it.

	   Note: up to level 15, you can use --patch-from in --single-thread
	   mode to improve compression ratio marginally at the cost of speed.
	   Using '--single-thread' above level 15 will lead to lower compres‐
	   sion ratios.

	   Note: for level 19, you can get increased compression ratio at the
	   cost of speed by specifying --zstd=targetLength= to be something
	   large (i.e. 4096), and by setting a large --zstd=chainLog=.

       •   --rsyncable: zstd will periodically synchronize the compression
	   state to make the compressed file more rsync-friendly. There is a
	   negligible impact to compression ratio, and a potential impact to
	   compression speed, perceptible at higher speeds, for example when
	   combining --rsyncable with many parallel worker threads. This fea‐
	   ture does not work with --single-thread. You probably don't want to
	   use it with long range mode, since it will decrease the effective‐
	   ness of the synchronization points, but your mileage may vary.

       •   -C, --[no-]check: add integrity check computed from uncompressed
	   data (default: enabled)

       •   --[no-]content-size: enable / disable whether or not the original
	   size of the file is placed in the header of the compressed file.
	   The default option is --content-size (meaning that the original
	   size will be placed in the header).

       •   --no-dictID: do not store dictionary ID within frame header (dic‐
	   tionary compression). The decoder will have to rely on implicit
	   knowledge about which dictionary to use, it won't be able to check
	   if it's correct.

       •   -M#, --memory=#: Set a memory usage limit. By default, zstd uses
	   128 MiB for decompression as the maximum amount of memory the de‐
	   compressor is allowed to use, but you can override this manually if
	   need be in either direction (i.e. you can increase or decrease it).

	   This is also used during compression when using with --patch-from=.
	   In this case, this parameter overrides that maximum size allowed
	   for a dictionary. (128 MiB).

	   Additionally, this can be used to limit memory for dictionary
	   training. This parameter overrides the default limit of 2 GiB. zstd
	   will load training samples up to the memory limit and ignore the
	   rest.

       •   --stream-size=#: Sets the pledged source size of input coming from
	   a stream. This value must be exact, as it will be included in the
	   produced frame header. Incorrect stream sizes will cause an error.
	   This information will be used to better optimize compression param‐
	   eters, resulting in better and potentially faster compression, es‐
	   pecially for smaller source sizes.

       •   --size-hint=#: When handling input from a stream, zstd must guess
	   how large the source size will be when optimizing compression pa‐
	   rameters. If the stream size is relatively small, this guess may be
	   a poor one, resulting in a higher compression ratio than expected.
	   This feature allows for controlling the guess when needed. Exact
	   guesses result in better compression ratios. Overestimates result
	   in slightly degraded compression ratios, while underestimates may
	   result in significant degradation.

       •   --target-compressed-block-size=#: Attempt to produce compressed
	   blocks of approximately this size. This will split larger blocks in
	   order to approach this target. This feature is notably useful for
	   improved latency, when the receiver can leverage receiving early
	   incomplete data. This parameter defines a loose target: compressed
	   blocks will target this size "on average", but individual blocks
	   can still be larger or smaller. Enabling this feature can decrease
	   compression speed by up to ~10% at level 1. Higher levels will see
	   smaller relative speed regression, becoming invisible at higher
	   settings.

       •   -f, --force: disable input and output checks. Allows overwriting
	   existing files, input from console, output to stdout, operating on
	   links, block devices, etc. During decompression and when the output
	   destination is stdout, pass-through unrecognized formats as-is.

       •   -c, --stdout: write to standard output (even if it is the console);
	   keep original files (disable --rm).

       •   -o FILE: save result into FILE. Note that this operation is in con‐
	   flict with -c. If both operations are present on the command line,
	   the last expressed one wins.

       •   --[no-]sparse: enable / disable sparse FS support, to make files
	   with many zeroes smaller on disk. Creating sparse files may save
	   disk space and speed up decompression by reducing the amount of
	   disk I/O. default: enabled when output is into a file, and disabled
	   when output is stdout. This setting overrides default and can force
	   sparse mode over stdout.

       •   --[no-]pass-through enable / disable passing through uncompressed
	   files as-is. During decompression when pass-through is enabled, un‐
	   recognized formats will be copied as-is from the input to the out‐
	   put. By default, pass-through will occur when the output destina‐
	   tion is stdout and the force (-f) option is set.

       •   --rm: remove source file(s) after successful compression or decom‐
	   pression. This command is silently ignored if output is stdout. If
	   used in combination with -o, triggers a confirmation prompt (which
	   can be silenced with -f), as this is a destructive operation.

       •   -k, --keep: keep source file(s) after successful compression or de‐
	   compression. This is the default behavior.

       •   -r: operate recursively on directories. It selects all files in the
	   named directory and all its subdirectories. This can be useful both
	   to reduce command line typing, and to circumvent shell expansion
	   limitations, when there are a lot of files and naming breaks the
	   maximum size of a command line.

       •   --filelist FILE read a list of files to process as content from
	   FILE. Format is compatible with ls output, with one file per line.

       •   --output-dir-flat DIR: resulting files are stored into target DIR
	   directory, instead of same directory as origin file. Be aware that
	   this command can introduce name collision issues, if multiple
	   files, from different directories, end up having the same name.
	   Collision resolution ensures first file with a given name will be
	   present in DIR, while in combination with -f, the last file will be
	   present instead.

       •   --output-dir-mirror DIR: similar to --output-dir-flat, the output
	   files are stored underneath target DIR directory, but this option
	   will replicate input directory hierarchy into output DIR.

	   If input directory contains "..", the files in this directory will
	   be ignored. If input directory is an absolute directory (i.e.
	   "/var/tmp/abc"), it will be stored into the "out‐
	   put-dir/var/tmp/abc". If there are multiple input files or directo‐
	   ries, name collision resolution will follow the same rules as
	   --output-dir-flat.

       •   --format=FORMAT: compress and decompress in other formats. If com‐
	   piled with support, zstd can compress to or decompress from other
	   compression algorithm formats. Possibly available options are zstd,
	   gzip, xz, lzma, and lz4. If no such format is provided, zstd is the
	   default.

       •   -h/-H, --help: display help/long help and exit

       •   -V, --version: display version number and immediately exit. note
	   that, since it exits, flags specified after -V are effectively ig‐
	   nored. Advanced: -vV also displays supported formats. -vvV also
	   displays POSIX support. -qV will only display the version number,
	   suitable for machine reading.

       •   -v, --verbose: verbose mode, display more information

       •   -q, --quiet: suppress warnings, interactivity, and notifications.
	   specify twice to suppress errors too.

       •   --no-progress: do not display the progress bar, but keep all other
	   messages.

       •   --show-default-cparams: shows the default compression parameters
	   that will be used for a particular input file, based on the pro‐
	   vided compression level and the input size. If the provided file is
	   not a regular file (e.g. a pipe), this flag will output the parame‐
	   ters used for inputs of unknown size.

       •   --exclude-compressed: only compress files that are not already com‐
	   pressed.

       •   --: All arguments after -- are treated as files



   gzip Operation Modifiers
       When invoked via a gzip symlink, zstd will support further options that
       intend to mimic the gzip behavior:

       -n, --no-name
	      do not store the original filename and timestamps when compress‐
	      ing a file. This is the default behavior and hence a no-op.

       --best alias to the option -9.

   Environment Variables
       Employing environment variables to set parameters has security implica‐
       tions. Therefore, this avenue is intentionally limited. Only
       ZSTD_CLEVEL and ZSTD_NBTHREADS are currently supported. They set the
       default compression level and number of threads to use during compres‐
       sion, respectively.

       ZSTD_CLEVEL can be used to set the level between 1 and 19 (the "normal"
       range). If the value of ZSTD_CLEVEL is not a valid integer, it will be
       ignored with a warning message. ZSTD_CLEVEL just replaces the default
       compression level (3).

       ZSTD_NBTHREADS can be used to set the number of threads zstd will at‐
       tempt to use during compression. If the value of ZSTD_NBTHREADS is not
       a valid unsigned integer, it will be ignored with a warning message.
       ZSTD_NBTHREADS has a default value of (1), and is capped at ZSTDMT_NB‐
       WORKERS_MAX==200. zstd must be compiled with multithread support for
       this variable to have any effect.

       They can both be overridden by corresponding command line arguments: -#
       for compression level and -T# for number of compression threads.

ADVANCED COMPRESSION OPTIONS
       zstd provides 22 predefined regular compression levels plus the fast
       levels. A compression level is translated internally into multiple ad‐
       vanced parameters that control the behavior of the compressor (one can
       observe the result of this translation with --show-default-cparams).
       These advanced parameters can be overridden using advanced compression
       options.

   --zstd[=options]:
       The options are provided as a comma-separated list. You may specify
       only the options you want to change and the rest will be taken from the
       selected or default compression level. The list of available options:

       strategy=strat, strat=strat
	      Specify a strategy used by a match finder.

	      There are 9 strategies numbered from 1 to 9, from fastest to
	      strongest:     1=ZSTD_fast,     2=ZSTD_dfast,	3=ZSTD_greedy,
	      4=ZSTD_lazy,    5=ZSTD_lazy2,    6=ZSTD_btlazy2,	 7=ZSTD_btopt,
	      8=ZSTD_btultra, 9=ZSTD_btultra2.

       windowLog=wlog, wlog=wlog
	      Specify the maximum number of bits for a match distance.

	      The higher number of increases the chance to find a match which
	      usually improves compression ratio. It also increases memory re‐
	      quirements for the compressor and decompressor. The minimum wlog
	      is 10 (1 KiB) and the maximum is 30 (1 GiB) on 32-bit platforms
	      and 31 (2 GiB) on 64-bit platforms.

	      Note: If windowLog is set to larger than 27, --long=windowLog or
	      --memory=windowSize needs to be passed to the decompressor.

       hashLog=hlog, hlog=hlog
	      Specify the maximum number of bits for a hash table.

	      Bigger hash tables cause fewer collisions which usually makes
	      compression faster, but requires more memory during compression.

	      The minimum hlog is 6 (64 entries / 256 B) and the maximum is 30
	      (1B entries / 4 GiB).

       chainLog=clog, clog=clog
	      Specify the maximum number of bits for the secondary search
	      structure, whose form depends on the selected strategy.

	      Higher numbers of bits increases the chance to find a match
	      which usually improves compression ratio. It also slows down
	      compression speed and increases memory requirements for compres‐
	      sion. This option is ignored for the ZSTD_fast strategy, which
	      only has the primary hash table.

	      The minimum clog is 6 (64 entries / 256 B) and the maximum is 29
	      (512M entries / 2 GiB) on 32-bit platforms and 30 (1B entries /
	      4 GiB) on 64-bit platforms.

       searchLog=slog, slog=slog
	      Specify the maximum number of searches in a hash chain or a bi‐
	      nary tree using logarithmic scale.

	      More searches increases the chance to find a match which usually
	      increases compression ratio but decreases compression speed.

	      The minimum slog is 1 and the maximum is 'windowLog' - 1.

       minMatch=mml, mml=mml
	      Specify the minimum searched length of a match in a hash table.

	      Larger search lengths usually decrease compression ratio but im‐
	      prove decompression speed.

	      The minimum mml is 3 and the maximum is 7.

       targetLength=tlen, tlen=tlen
	      The impact of this field vary depending on selected strategy.

	      For ZSTD_btopt, ZSTD_btultra and ZSTD_btultra2, it specifies the
	      minimum match length that causes match finder to stop searching.
	      A larger targetLength usually improves compression ratio but de‐
	      creases compression speed.

	      For ZSTD_fast, it triggers ultra-fast mode when > 0. The value
	      represents the amount of data skipped between match sampling.
	      Impact is reversed: a larger targetLength increases compression
	      speed but decreases compression ratio.

	      For all other strategies, this field has no impact.

	      The minimum tlen is 0 and the maximum is 128 KiB.

       overlapLog=ovlog, ovlog=ovlog
	      Determine overlapSize, amount of data reloaded from previous
	      job. This parameter is only available when multithreading is en‐
	      abled. Reloading more data improves compression ratio, but de‐
	      creases speed.

	      The minimum ovlog is 0, and the maximum is 9. 1 means "no over‐
	      lap", hence completely independent jobs. 9 means "full overlap",
	      meaning up to windowSize is reloaded from previous job. Reducing
	      ovlog by 1 reduces the reloaded amount by a factor 2. For exam‐
	      ple, 8 means "windowSize/2", and 6 means "windowSize/8". Value 0
	      is special and means "default": ovlog is automatically deter‐
	      mined by zstd. In which case, ovlog will range from 6 to 9, de‐
	      pending on selected strat.

       ldmHashLog=lhlog, lhlog=lhlog
	      Specify the maximum size for a hash table used for long distance
	      matching.

	      This option is ignored unless long distance matching is enabled.

	      Bigger hash tables usually improve compression ratio at the ex‐
	      pense of more memory during compression and a decrease in com‐
	      pression speed.

	      The minimum lhlog is 6 and the maximum is 30 (default: 20).

       ldmMinMatch=lmml, lmml=lmml
	      Specify the minimum searched length of a match for long distance
	      matching.

	      This option is ignored unless long distance matching is enabled.

	      Larger/very small values usually decrease compression ratio.

	      The minimum lmml is 4 and the maximum is 4096 (default: 64).

       ldmBucketSizeLog=lblog, lblog=lblog
	      Specify the size of each bucket for the hash table used for long
	      distance matching.

	      This option is ignored unless long distance matching is enabled.

	      Larger bucket sizes improve collision resolution but decrease
	      compression speed.

	      The minimum lblog is 1 and the maximum is 8 (default: 3).

       ldmHashRateLog=lhrlog, lhrlog=lhrlog
	      Specify the frequency of inserting entries into the long dis‐
	      tance matching hash table.

	      This option is ignored unless long distance matching is enabled.

	      Larger values will improve compression speed. Deviating far from
	      the default value will likely result in a decrease in compres‐
	      sion ratio.

	      The default value is wlog - lhlog.

   Example
       The following parameters sets advanced compression options to something
       similar to predefined level 19 for files bigger than 256 KB:

       --zstd=wlog=23,clog=23,hlog=22,slog=6,mml=3,tlen=48,strat=6

   -B#:
       Specify the size of each compression job. This parameter is only avail‐
       able when multi-threading is enabled. Each compression job is run in
       parallel, so this value indirectly impacts the nb of active threads.
       Default job size varies depending on compression level (generally 4 *
       windowSize). -B# makes it possible to manually select a custom size.
       Note that job size must respect a minimum value which is enforced
       transparently. This minimum is either 512 KB, or overlapSize, whichever
       is largest. Different job sizes will lead to non-identical compressed
       frames.

DICTIONARY BUILDER
       zstd offers dictionary compression, which greatly improves efficiency
       on small files and messages. It's possible to train zstd with a set of
       samples, the result of which is saved into a file called a dictionary.
       Then, during compression and decompression, reference the same dictio‐
       nary, using command -D dictionaryFileName. Compression of small files
       similar to the sample set will be greatly improved.

       --train FILEs
	      Use FILEs as training set to create a dictionary. The training
	      set should ideally contain a lot of samples (> 100), and weight
	      typically 100x the target dictionary size (for example, ~10 MB
	      for a 100 KB dictionary). --train can be combined with -r to in‐
	      dicate a directory rather than listing all the files, which can
	      be useful to circumvent shell expansion limits.

	      Since dictionary compression is mostly effective for small
	      files, the expectation is that the training set will only con‐
	      tain small files. In the case where some samples happen to be
	      large, only the first 128 KiB of these samples will be used for
	      training.

	      --train supports multithreading if zstd is compiled with thread‐
	      ing support (default). Additional advanced parameters can be
	      specified with --train-fastcover. The legacy dictionary builder
	      can be accessed with --train-legacy. The slower cover dictionary
	      builder can be accessed with --train-cover. Default --train is
	      equivalent to --train-fastcover=d=8,steps=4.

       -o FILE
	      Dictionary saved into FILE (default name: dictionary).

       --maxdict=#
	      Limit dictionary to specified size (default: 112640 bytes). As
	      usual, quantities are expressed in bytes by default, and it's
	      possible to employ suffixes (like KB or MB) to specify larger
	      values.

       -#     Use # compression level during training (optional). Will gener‐
	      ate statistics more tuned for selected compression level, re‐
	      sulting in a small compression ratio improvement for this level.

       -B#    Split input files into blocks of size # (default: no split)

       -M#, --memory=#
	      Limit the amount of sample data loaded for training (default: 2
	      GB). Note that the default (2 GB) is also the maximum. This pa‐
	      rameter can be useful in situations where the training set size
	      is not well controlled and could be potentially very large.
	      Since speed of the training process is directly correlated to
	      the size of the training sample set, a smaller sample set leads
	      to faster training.

	      In situations where the training set is larger than maximum mem‐
	      ory, the CLI will randomly select samples among the available
	      ones, up to the maximum allowed memory budget. This is meant to
	      improve dictionary relevance by mitigating the potential impact
	      of clustering, such as selecting only files from the beginning
	      of a list sorted by modification date, or sorted by alphabetical
	      order. The randomization process is deterministic, so training
	      of the same list of files with the same parameters will lead to
	      the creation of the same dictionary.

       --dictID=#
	      A dictionary ID is a locally unique ID. The decoder will use
	      this value to verify it is using the right dictionary. By de‐
	      fault, zstd will create a 4-bytes random number ID. It's possi‐
	      ble to provide an explicit number ID instead. It's up to the
	      dictionary manager to not assign twice the same ID to 2 differ‐
	      ent dictionaries. Note that short numbers have an advantage: an
	      ID < 256 will only need 1 byte in the compressed frame header,
	      and an ID < 65536 will only need 2 bytes. This compares favor‐
	      ably to 4 bytes default.

	      Note that RFC8878 reserves IDs less than 32768 and greater than
	      or equal to 2\^31, so they should not be used in public.

       --train-cover[=k#,d=#,steps=#,split=#,shrink[=#]]
	      Select parameters for the default dictionary builder algorithm
	      named cover. If d is not specified, then it tries d = 6 and d =
	      8. If k is not specified, then it tries steps values in the
	      range [50, 2000]. If steps is not specified, then the default
	      value of 40 is used. If split is not specified or split <= 0,
	      then the default value of 100 is used. Requires that d <= k. If
	      shrink flag is not used, then the default value for shrinkDict
	      of 0 is used. If shrink is not specified, then the default value
	      for shrinkDictMaxRegression of 1 is used.

	      Selects segments of size k with highest score to put in the dic‐
	      tionary. The score of a segment is computed by the sum of the
	      frequencies of all the subsegments of size d. Generally d should
	      be in the range [6, 8], occasionally up to 16, but the algorithm
	      will run faster with d <= 8. Good values for k vary widely based
	      on the input data, but a safe range is [2 * d, 2000]. If split
	      is 100, all input samples are used for both training and testing
	      to find optimal d and k to build dictionary. Supports multi‐
	      threading if zstd is compiled with threading support. Having
	      shrink enabled takes a truncated dictionary of minimum size and
	      doubles in size until compression ratio of the truncated dictio‐
	      nary is at most shrinkDictMaxRegression% worse than the compres‐
	      sion ratio of the largest dictionary.

	      Examples:

	      zstd --train-cover FILEs

	      zstd --train-cover=k=50,d=8 FILEs

	      zstd --train-cover=d=8,steps=500 FILEs

	      zstd --train-cover=k=50 FILEs

	      zstd --train-cover=k=50,split=60 FILEs

	      zstd --train-cover=shrink FILEs

	      zstd --train-cover=shrink=2 FILEs

       --train-fastcover[=k#,d=#,f=#,steps=#,split=#,accel=#]
	      Same as cover but with extra parameters f and accel and differ‐
	      ent default value of split If split is not specified, then it
	      tries split = 75. If f is not specified, then it tries f = 20.
	      Requires that 0 < f < 32. If accel is not specified, then it
	      tries accel = 1. Requires that 0 < accel <= 10. Requires that d
	      = 6 or d = 8.

	      f is log of size of array that keeps track of frequency of sub‐
	      segments of size d. The subsegment is hashed to an index in the
	      range [0,2^f - 1]. It is possible that 2 different subsegments
	      are hashed to the same index, and they are considered as the
	      same subsegment when computing frequency. Using a higher f re‐
	      duces collision but takes longer.

	      Examples:

	      zstd --train-fastcover FILEs

	      zstd --train-fastcover=d=8,f=15,accel=2 FILEs

       --train-legacy[=selectivity=#]
	      Use legacy dictionary builder algorithm with the given dictio‐
	      nary selectivity (default: 9). The smaller the selectivity
	      value, the denser the dictionary, improving its efficiency but
	      reducing its achievable maximum size. --train-legacy=s=# is also
	      accepted.

	      Examples:

	      zstd --train-legacy FILEs

	      zstd --train-legacy=selectivity=8 FILEs

BENCHMARK
       The zstd CLI provides a benchmarking mode that can be used to easily
       find suitable compression parameters, or alternatively to benchmark a
       computer's performance. zstd -b [FILE(s)] will benchmark zstd for both
       compression and decompression using default compression level. Note
       that results are very dependent on the content being compressed. It's
       possible to pass multiple files to the benchmark, and even a directory
       with -r DIRECTORY. When no FILE is provided, the benchmark will use a
       procedurally generated lorem ipsum text.

       •   -b#: benchmark file(s) using compression level #

       •   -e#: benchmark file(s) using multiple compression levels, from -b#
	   to -e# (inclusive)

       •   -d: benchmark decompression speed only (requires providing a
	   zstd-compressed content)

       •   -i#: minimum evaluation time, in seconds (default: 3s), benchmark
	   mode only

       •   -B#, --block-size=#: cut file(s) into independent chunks of size #
	   (default: no chunking)

       •   -S: output one benchmark result per input file (default: consoli‐
	   dated result)

       •   -D dictionary benchmark using dictionary

       •   --priority=rt: set process priority to real-time (Windows)



       Beyond compression levels, benchmarking is also compatible with other
       parameters, such as number of threads (-T#), advanced compression pa‐
       rameters (--zstd=###), dictionary compression (-D dictionary), or even
       disabling checksum verification for example.

       Output Format: CompressionLevel#Filename: InputSize -> OutputSize (Com‐
       pressionRatio), CompressionSpeed, DecompressionSpeed

       Methodology: For speed measurement, the entire input is compressed/de‐
       compressed in-memory to measure speed. A run lasts at least 1 sec, so
       when files are small, they are compressed/decompressed several times
       per run, in order to improve measurement accuracy.

SEE ALSO
       zstdgrep(1), zstdless(1), gzip(1), xz(1)

       The zstandard format is specified in Y. Collet, "Zstandard Compression
       and	   the	       'application/zstd'	  Media		Type",
       https://www.ietf.org/rfc/rfc8878.txt,   Internet	  RFC  8878  (February
       2021).

BUGS
       Report bugs at: https://github.com/facebook/zstd/issues

AUTHOR
       Yann Collet



zstd 1.5.6			 October 2024			       ZSTD(1)
ZSTD(1)				 User Commands			       ZSTD(1)



NAME
       zstd  -	zstd,  zstdmt,	unzstd,	 zstdcat - Compress or decompress .zst
       files

SYNOPSIS
       allbox; zstd [OPTIONS] [-   INPUT-FILE] [-o OUTPUT-FILE]

       zstdmt is equivalent to zstd -T0

       unzstd is equivalent to zstd -d

       zstdcat is equivalent to zstd -dcf

DESCRIPTION
       zstd is a fast lossless	compression  algorithm	and  data  compression
       tool,  with  command  line  syntax  similar to gzip(1) and xz(1). It is
       based on the LZ77 family, with further FSE & huff0 entropy stages. zstd
       offers  highly configurable compression speed, from fast modes at > 200
       MB/s per core, to strong modes with excellent  compression  ratios.  It
       also  features  a  very	fast decoder, with speeds > 500 MB/s per core,
       which remains roughly stable at all compression settings.

       zstd command line syntax is generally similar to gzip, but features the
       following few differences:

       •   Source files are preserved by default. It's possible to remove them
	   automatically by using the --rm command.

       •   When compressing a single file, zstd	 displays  progress  notifica‐
	   tions and result summary by default. Use -q to turn them off.

       •   zstd	 displays a short help page when command line is an error. Use
	   -q to turn it off.

       •   zstd does not accept input from  console,  though  it  does	accept
	   stdin when it's not the console.

       •   zstd	 does  not  store the input's filename or attributes, only its
	   contents.



       zstd processes each file according to the selected operation  mode.  If
       no  files  are  given  or file is -, zstd reads from standard input and
       writes the processed data to standard output. zstd will refuse to write
       compressed data to standard output if it is a terminal: it will display
       an error message and skip the file. Similarly, zstd will refuse to read
       compressed data from standard input if it is a terminal.

       Unless  --stdout	 or  -o	 is specified, files are written to a new file
       whose name is derived from the source file name:

       •   When compressing, the suffix .zst is appended to the	 source	 file‐
	   name to get the target filename.

       •   When	 decompressing,	 the  .zst  suffix  is removed from the source
	   filename to get the target filename



   Concatenation with .zst Files
       It is possible to concatenate multiple .zst files. zstd will decompress
       such agglomerated file as if it was a single .zst file.

OPTIONS
   Integer Suffixes and Special Values
       In  most places where an integer argument is expected, an optional suf‐
       fix is supported to easily indicate large integers. There  must	be  no
       space between the integer and the suffix.

       KiB    Multiply	the  integer  by  1,024 (2\^10). Ki, K, and KB are ac‐
	      cepted as synonyms for KiB.

       MiB    Multiply the integer by 1,048,576 (2\^20). Mi, M, and MB are ac‐
	      cepted as synonyms for MiB.

   Operation Mode
       If  multiple  operation	mode options are given, the last one takes ef‐
       fect.

       -z, --compress
	      Compress. This is the default operation mode when	 no  operation
	      mode  option is specified and no other operation mode is implied
	      from the command name  (for  example,  unzstd  implies  --decom‐
	      press).

       -d, --decompress, --uncompress
	      Decompress.

       -t, --test
	      Test  the	 integrity of compressed files. This option is equiva‐
	      lent to --decompress --stdout > /dev/null, decompressed data  is
	      discarded	 and  checksummed  for errors. No files are created or
	      removed.

       -b#    Benchmark file(s) using compression level #. See BENCHMARK below
	      for a description of this operation.

       --train FILES
	      Use FILES as a training set to create a dictionary. The training
	      set should contain a lot of small files (> 100). See  DICTIONARY
	      BUILDER below for a description of this operation.

       -l, --list
	      Display  information  related to a zstd compressed file, such as
	      size, ratio, and checksum. Some  of  these  fields  may  not  be
	      available.  This	command's  output can be augmented with the -v
	      modifier.

   Operation Modifiers
       •   -#: selects # compression level [1-19] (default:  3).  Higher  com‐
	   pression  levels  generally produce higher compression ratio at the
	   expense of speed and memory. A rough rule of thumb is that compres‐
	   sion	 speed	is expected to be divided by 2 every 2 levels. Techni‐
	   cally, each level is mapped to a set of advanced  parameters	 (that
	   can also be modified individually, see below). Because the compres‐
	   sor's behavior highly depends on the content to  compress,  there's
	   no guarantee of a smooth progression from one level to another.

       •   --ultra:  unlocks high compression levels 20+ (maximum 22), using a
	   lot more memory. Note that decompression  will  also	 require  more
	   memory when using these levels.

       •   --fast[=#]:	switch	to ultra-fast compression levels. If =# is not
	   present, it defaults to 1. The higher the  value,  the  faster  the
	   compression speed, at the cost of some compression ratio. This set‐
	   ting overwrites compression level if one was set previously.	 Simi‐
	   larly, if a compression level is set after --fast, it overrides it.

       •   -T#, --threads=#: Compress using # working threads (default: 1). If
	   # is 0, attempt to detect and use the number of physical CPU cores.
	   In  all cases, the nb of threads is capped to ZSTDMT_NBWORKERS_MAX,
	   which is either 64 in 32-bit mode, or 256 for 64-bit	 environments.
	   This	 modifier does nothing if zstd is compiled without multithread
	   support.

       •   --single-thread: Use a single thread for both I/O and  compression.
	   As compression is serialized with I/O, this can be slightly slower.
	   Single-thread mode features significantly lower memory usage, which
	   can	be  useful  for systems with limited amount of memory, such as
	   32-bit systems.

	   Note 1: this mode is the only available one when  multithread  sup‐
	   port is disabled.

	   Note 2: this mode is different from -T1, which spawns 1 compression
	   thread in parallel  with  I/O.  Final  compressed  result  is  also
	   slightly different from -T1.

       •   --auto-threads={physical,logical} (default: physical): When using a
	   default amount of threads via -T0, choose the default based on  the
	   number of detected physical or logical cores.

       •   --adapt[=min=#,max=#]:  zstd	 will  dynamically  adapt  compression
	   level to perceived I/O conditions. Compression level adaptation can
	   be observed live by using command -v. Adaptation can be constrained
	   between supplied min and max levels. The feature  works  when  com‐
	   bined  with	multi-threading and --long mode. It does not work with
	   --single-thread. It sets window size to 8 MiB by  default  (can  be
	   changed  manually,  see wlog). Due to the chaotic nature of dynamic
	   adaptation, compressed result is not reproducible.

	   Note: at the time of this writing, --adapt can remain stuck at  low
	   speed when combined with multiple worker threads (>=2).

       •   --long[=#]:	enables	 long distance matching with # windowLog, if #
	   is not present it defaults to 27. This increases  the  window  size
	   (windowLog) and memory usage for both the compressor and decompres‐
	   sor. This setting is designed to improve the compression ratio  for
	   files with long matches at a large distance.

	   Note:  If  windowLog	 is set to larger than 27, --long=windowLog or
	   --memory=windowSize needs to be passed to the decompressor.

       •   -D DICT: use DICT as Dictionary to compress or decompress FILE(s)

       •   --patch-from FILE: Specify the file to be used as a reference point
	   for	zstd's diff engine. This is effectively dictionary compression
	   with some convenient parameter selection, namely that windowSize  >
	   srcSize.

	   Note: cannot use both this and -D together.

	   Note:  --long  mode	will  be automatically activated if chainLog <
	   fileLog (fileLog being the windowLog required to  cover  the	 whole
	   file). You can also manually force it.

	   Note:  up  to level 15, you can use --patch-from in --single-thread
	   mode to improve compression ratio marginally at the cost of	speed.
	   Using  '--single-thread' above level 15 will lead to lower compres‐
	   sion ratios.

	   Note: for level 19, you can get increased compression ratio at  the
	   cost	 of  speed  by specifying --zstd=targetLength= to be something
	   large (i.e. 4096), and by setting a large --zstd=chainLog=.

       •   --rsyncable: zstd will  periodically	 synchronize  the  compression
	   state  to  make the compressed file more rsync-friendly. There is a
	   negligible impact to compression ratio, and a potential  impact  to
	   compression	speed,	perceptible at higher speeds, for example when
	   combining --rsyncable with many parallel worker threads. This  fea‐
	   ture does not work with --single-thread. You probably don't want to
	   use it with long range mode, since it will decrease the  effective‐
	   ness of the synchronization points, but your mileage may vary.

       •   -C,	--[no-]check:  add  integrity check computed from uncompressed
	   data (default: enabled)

       •   --[no-]content-size: enable / disable whether or not	 the  original
	   size	 of  the  file is placed in the header of the compressed file.
	   The default option is --content-size	 (meaning  that	 the  original
	   size will be placed in the header).

       •   --no-dictID:	 do  not store dictionary ID within frame header (dic‐
	   tionary compression). The decoder will have	to  rely  on  implicit
	   knowledge  about which dictionary to use, it won't be able to check
	   if it's correct.

       •   -M#, --memory=#: Set a memory usage limit. By  default,  zstd  uses
	   128	MiB  for decompression as the maximum amount of memory the de‐
	   compressor is allowed to use, but you can override this manually if
	   need be in either direction (i.e. you can increase or decrease it).

	   This is also used during compression when using with --patch-from=.
	   In this case, this parameter overrides that	maximum	 size  allowed
	   for a dictionary. (128 MiB).

	   Additionally,  this	can  be	 used  to  limit memory for dictionary
	   training. This parameter overrides the default limit of 2 GiB. zstd
	   will	 load  training	 samples up to the memory limit and ignore the
	   rest.

       •   --stream-size=#: Sets the pledged source size of input coming  from
	   a  stream.  This value must be exact, as it will be included in the
	   produced frame header. Incorrect stream sizes will cause an	error.
	   This information will be used to better optimize compression param‐
	   eters, resulting in better and potentially faster compression,  es‐
	   pecially for smaller source sizes.

       •   --size-hint=#:  When	 handling input from a stream, zstd must guess
	   how large the source size will be when optimizing  compression  pa‐
	   rameters. If the stream size is relatively small, this guess may be
	   a poor one, resulting in a higher compression ratio than  expected.
	   This	 feature  allows  for controlling the guess when needed. Exact
	   guesses result in better compression ratios.	 Overestimates	result
	   in  slightly	 degraded compression ratios, while underestimates may
	   result in significant degradation.

       •   --target-compressed-block-size=#:  Attempt  to  produce  compressed
	   blocks of approximately this size. This will split larger blocks in
	   order to approach this target. This feature is notably  useful  for
	   improved  latency,  when  the receiver can leverage receiving early
	   incomplete data. This parameter defines a loose target:  compressed
	   blocks  will	 target	 this size "on average", but individual blocks
	   can still be larger or smaller. Enabling this feature can  decrease
	   compression	speed by up to ~10% at level 1. Higher levels will see
	   smaller relative speed regression,  becoming	 invisible  at	higher
	   settings.

       •   -f,	--force:  disable  input and output checks. Allows overwriting
	   existing files, input from console, output to stdout, operating  on
	   links, block devices, etc. During decompression and when the output
	   destination is stdout, pass-through unrecognized formats as-is.

       •   -c, --stdout: write to standard output (even if it is the console);
	   keep original files (disable --rm).

       •   -o FILE: save result into FILE. Note that this operation is in con‐
	   flict with -c. If both operations are present on the command	 line,
	   the last expressed one wins.

       •   --[no-]sparse:  enable  /  disable sparse FS support, to make files
	   with many zeroes smaller on disk. Creating sparse  files  may  save
	   disk	 space	and  speed  up decompression by reducing the amount of
	   disk I/O. default: enabled when output is into a file, and disabled
	   when output is stdout. This setting overrides default and can force
	   sparse mode over stdout.

       •   --[no-]pass-through enable / disable passing	 through  uncompressed
	   files as-is. During decompression when pass-through is enabled, un‐
	   recognized formats will be copied as-is from the input to the  out‐
	   put.	 By  default, pass-through will occur when the output destina‐
	   tion is stdout and the force (-f) option is set.

       •   --rm: remove source file(s) after successful compression or	decom‐
	   pression.  This command is silently ignored if output is stdout. If
	   used in combination with -o, triggers a confirmation prompt	(which
	   can be silenced with -f), as this is a destructive operation.

       •   -k, --keep: keep source file(s) after successful compression or de‐
	   compression. This is the default behavior.

       •   -r: operate recursively on directories. It selects all files in the
	   named directory and all its subdirectories. This can be useful both
	   to reduce command line typing, and to  circumvent  shell  expansion
	   limitations,	 when  there  are a lot of files and naming breaks the
	   maximum size of a command line.

       •   --filelist FILE read a list of files to  process  as	 content  from
	   FILE. Format is compatible with ls output, with one file per line.

       •   --output-dir-flat  DIR:  resulting files are stored into target DIR
	   directory, instead of same directory as origin file. Be aware  that
	   this	 command  can  introduce  name	collision  issues, if multiple
	   files, from different directories, end up  having  the  same	 name.
	   Collision  resolution  ensures first file with a given name will be
	   present in DIR, while in combination with -f, the last file will be
	   present instead.

       •   --output-dir-mirror	DIR:  similar to --output-dir-flat, the output
	   files are stored underneath target DIR directory, but  this	option
	   will replicate input directory hierarchy into output DIR.

	   If  input directory contains "..", the files in this directory will
	   be ignored. If input	 directory  is	an  absolute  directory	 (i.e.
	   "/var/tmp/abc"),    it    will    be	   stored   into   the	 "out‐
	   put-dir/var/tmp/abc". If there are multiple input files or directo‐
	   ries,  name	collision  resolution  will  follow  the same rules as
	   --output-dir-flat.

       •   --format=FORMAT: compress and decompress in other formats. If  com‐
	   piled  with	support, zstd can compress to or decompress from other
	   compression algorithm formats. Possibly available options are zstd,
	   gzip, xz, lzma, and lz4. If no such format is provided, zstd is the
	   default.

       •   -h/-H, --help: display help/long help and exit

       •   -V, --version: display version number and  immediately  exit.  note
	   that,  since it exits, flags specified after -V are effectively ig‐
	   nored. Advanced: -vV also displays  supported  formats.  -vvV  also
	   displays  POSIX  support. -qV will only display the version number,
	   suitable for machine reading.

       •   -v, --verbose: verbose mode, display more information

       •   -q, --quiet: suppress warnings, interactivity,  and	notifications.
	   specify twice to suppress errors too.

       •   --no-progress:  do not display the progress bar, but keep all other
	   messages.

       •   --show-default-cparams: shows the  default  compression  parameters
	   that	 will  be  used for a particular input file, based on the pro‐
	   vided compression level and the input size. If the provided file is
	   not a regular file (e.g. a pipe), this flag will output the parame‐
	   ters used for inputs of unknown size.

       •   --exclude-compressed: only compress files that are not already com‐
	   pressed.

       •   --: All arguments after -- are treated as files



   gzip Operation Modifiers
       When invoked via a gzip symlink, zstd will support further options that
       intend to mimic the gzip behavior:

       -n, --no-name
	      do not store the original filename and timestamps when compress‐
	      ing a file. This is the default behavior and hence a no-op.

       --best alias to the option -9.

   Environment Variables
       Employing environment variables to set parameters has security implica‐
       tions.  Therefore,  this	 avenue	  is   intentionally   limited.	  Only
       ZSTD_CLEVEL  and	 ZSTD_NBTHREADS	 are currently supported. They set the
       default compression level and number of threads to use during  compres‐
       sion, respectively.

       ZSTD_CLEVEL can be used to set the level between 1 and 19 (the "normal"
       range). If the value of ZSTD_CLEVEL is not a valid integer, it will  be
       ignored	with  a warning message. ZSTD_CLEVEL just replaces the default
       compression level (3).

       ZSTD_NBTHREADS can be used to set the number of threads zstd  will  at‐
       tempt  to use during compression. If the value of ZSTD_NBTHREADS is not
       a valid unsigned integer, it will be ignored with  a  warning  message.
       ZSTD_NBTHREADS  has a default value of (1), and is capped at ZSTDMT_NB‐
       WORKERS_MAX==200. zstd must be compiled with  multithread  support  for
       this variable to have any effect.

       They can both be overridden by corresponding command line arguments: -#
       for compression level and -T# for number of compression threads.

ADVANCED COMPRESSION OPTIONS
       zstd provides 22 predefined regular compression levels  plus  the  fast
       levels.	A compression level is translated internally into multiple ad‐
       vanced parameters that control the behavior of the compressor (one  can
       observe	the  result  of this translation with --show-default-cparams).
       These advanced parameters can be overridden using advanced  compression
       options.

   --zstd[=options]:
       The  options  are  provided  as a comma-separated list. You may specify
       only the options you want to change and the rest will be taken from the
       selected or default compression level. The list of available options:

       strategy=strat, strat=strat
	      Specify a strategy used by a match finder.

	      There  are  9  strategies	 numbered from 1 to 9, from fastest to
	      strongest:     1=ZSTD_fast,     2=ZSTD_dfast,	3=ZSTD_greedy,
	      4=ZSTD_lazy,    5=ZSTD_lazy2,    6=ZSTD_btlazy2,	 7=ZSTD_btopt,
	      8=ZSTD_btultra, 9=ZSTD_btultra2.

       windowLog=wlog, wlog=wlog
	      Specify the maximum number of bits for a match distance.

	      The higher number of increases the chance to find a match	 which
	      usually improves compression ratio. It also increases memory re‐
	      quirements for the compressor and decompressor. The minimum wlog
	      is  10 (1 KiB) and the maximum is 30 (1 GiB) on 32-bit platforms
	      and 31 (2 GiB) on 64-bit platforms.

	      Note: If windowLog is set to larger than 27, --long=windowLog or
	      --memory=windowSize needs to be passed to the decompressor.

       hashLog=hlog, hlog=hlog
	      Specify the maximum number of bits for a hash table.

	      Bigger  hash  tables  cause fewer collisions which usually makes
	      compression faster, but requires more memory during compression.

	      The minimum hlog is 6 (64 entries / 256 B) and the maximum is 30
	      (1B entries / 4 GiB).

       chainLog=clog, clog=clog
	      Specify  the  maximum  number  of	 bits for the secondary search
	      structure, whose form depends on the selected strategy.

	      Higher numbers of bits increases the  chance  to	find  a	 match
	      which  usually  improves	compression  ratio. It also slows down
	      compression speed and increases memory requirements for compres‐
	      sion.  This  option is ignored for the ZSTD_fast strategy, which
	      only has the primary hash table.

	      The minimum clog is 6 (64 entries / 256 B) and the maximum is 29
	      (512M  entries / 2 GiB) on 32-bit platforms and 30 (1B entries /
	      4 GiB) on 64-bit platforms.

       searchLog=slog, slog=slog
	      Specify the maximum number of searches in a hash chain or a  bi‐
	      nary tree using logarithmic scale.

	      More searches increases the chance to find a match which usually
	      increases compression ratio but decreases compression speed.

	      The minimum slog is 1 and the maximum is 'windowLog' - 1.

       minMatch=mml, mml=mml
	      Specify the minimum searched length of a match in a hash table.

	      Larger search lengths usually decrease compression ratio but im‐
	      prove decompression speed.

	      The minimum mml is 3 and the maximum is 7.

       targetLength=tlen, tlen=tlen
	      The impact of this field vary depending on selected strategy.

	      For ZSTD_btopt, ZSTD_btultra and ZSTD_btultra2, it specifies the
	      minimum match length that causes match finder to stop searching.
	      A larger targetLength usually improves compression ratio but de‐
	      creases compression speed.

	      For ZSTD_fast, it triggers ultra-fast mode when > 0.  The	 value
	      represents  the  amount  of data skipped between match sampling.
	      Impact is reversed: a larger targetLength increases  compression
	      speed but decreases compression ratio.

	      For all other strategies, this field has no impact.

	      The minimum tlen is 0 and the maximum is 128 KiB.

       overlapLog=ovlog, ovlog=ovlog
	      Determine	 overlapSize,  amount  of  data reloaded from previous
	      job. This parameter is only available when multithreading is en‐
	      abled.  Reloading	 more data improves compression ratio, but de‐
	      creases speed.

	      The minimum ovlog is 0, and the maximum is 9. 1 means "no	 over‐
	      lap", hence completely independent jobs. 9 means "full overlap",
	      meaning up to windowSize is reloaded from previous job. Reducing
	      ovlog  by 1 reduces the reloaded amount by a factor 2. For exam‐
	      ple, 8 means "windowSize/2", and 6 means "windowSize/8". Value 0
	      is  special  and	means "default": ovlog is automatically deter‐
	      mined by zstd. In which case, ovlog will range from 6 to 9,  de‐
	      pending on selected strat.

       ldmHashLog=lhlog, lhlog=lhlog
	      Specify the maximum size for a hash table used for long distance
	      matching.

	      This option is ignored unless long distance matching is enabled.

	      Bigger hash tables usually improve compression ratio at the  ex‐
	      pense  of	 more memory during compression and a decrease in com‐
	      pression speed.

	      The minimum lhlog is 6 and the maximum is 30 (default: 20).

       ldmMinMatch=lmml, lmml=lmml
	      Specify the minimum searched length of a match for long distance
	      matching.

	      This option is ignored unless long distance matching is enabled.

	      Larger/very small values usually decrease compression ratio.

	      The minimum lmml is 4 and the maximum is 4096 (default: 64).

       ldmBucketSizeLog=lblog, lblog=lblog
	      Specify the size of each bucket for the hash table used for long
	      distance matching.

	      This option is ignored unless long distance matching is enabled.

	      Larger bucket sizes improve collision  resolution	 but  decrease
	      compression speed.

	      The minimum lblog is 1 and the maximum is 8 (default: 3).

       ldmHashRateLog=lhrlog, lhrlog=lhrlog
	      Specify  the  frequency  of inserting entries into the long dis‐
	      tance matching hash table.

	      This option is ignored unless long distance matching is enabled.

	      Larger values will improve compression speed. Deviating far from
	      the  default  value will likely result in a decrease in compres‐
	      sion ratio.

	      The default value is wlog - lhlog.

   Example
       The following parameters sets advanced compression options to something
       similar to predefined level 19 for files bigger than 256 KB:

       --zstd=wlog=23,clog=23,hlog=22,slog=6,mml=3,tlen=48,strat=6

   -B#:
       Specify the size of each compression job. This parameter is only avail‐
       able when multi-threading is enabled. Each compression job  is  run  in
       parallel,  so  this  value indirectly impacts the nb of active threads.
       Default job size varies depending on compression level (generally  4  *
       windowSize).  -B#  makes	 it possible to manually select a custom size.
       Note that job size must respect	a  minimum  value  which  is  enforced
       transparently. This minimum is either 512 KB, or overlapSize, whichever
       is largest. Different job sizes will lead to  non-identical  compressed
       frames.

DICTIONARY BUILDER
       zstd  offers  dictionary compression, which greatly improves efficiency
       on small files and messages. It's possible to train zstd with a set  of
       samples,	 the result of which is saved into a file called a dictionary.
       Then, during compression and decompression, reference the same  dictio‐
       nary,  using  command -D dictionaryFileName. Compression of small files
       similar to the sample set will be greatly improved.

       --train FILEs
	      Use FILEs as training set to create a dictionary.	 The  training
	      set  should ideally contain a lot of samples (> 100), and weight
	      typically 100x the target dictionary size (for example,  ~10  MB
	      for a 100 KB dictionary). --train can be combined with -r to in‐
	      dicate a directory rather than listing all the files, which  can
	      be useful to circumvent shell expansion limits.

	      Since  dictionary	 compression  is  mostly  effective  for small
	      files, the expectation is that the training set will  only  con‐
	      tain  small  files.  In the case where some samples happen to be
	      large, only the first 128 KiB of these samples will be used  for
	      training.

	      --train supports multithreading if zstd is compiled with thread‐
	      ing support (default). Additional	 advanced  parameters  can  be
	      specified	 with --train-fastcover. The legacy dictionary builder
	      can be accessed with --train-legacy. The slower cover dictionary
	      builder  can  be accessed with --train-cover. Default --train is
	      equivalent to --train-fastcover=d=8,steps=4.

       -o FILE
	      Dictionary saved into FILE (default name: dictionary).

       --maxdict=#
	      Limit dictionary to specified size (default: 112640  bytes).  As
	      usual,  quantities  are  expressed in bytes by default, and it's
	      possible to employ suffixes (like KB or MB)  to  specify	larger
	      values.

       -#     Use  # compression level during training (optional). Will gener‐
	      ate statistics more tuned for selected  compression  level,  re‐
	      sulting in a small compression ratio improvement for this level.

       -B#    Split input files into blocks of size # (default: no split)

       -M#, --memory=#
	      Limit  the amount of sample data loaded for training (default: 2
	      GB). Note that the default (2 GB) is also the maximum. This  pa‐
	      rameter  can be useful in situations where the training set size
	      is not well controlled and  could	 be  potentially  very	large.
	      Since  speed  of	the training process is directly correlated to
	      the size of the training sample set, a smaller sample set	 leads
	      to faster training.

	      In situations where the training set is larger than maximum mem‐
	      ory, the CLI will randomly select samples	 among	the  available
	      ones,  up to the maximum allowed memory budget. This is meant to
	      improve dictionary relevance by mitigating the potential	impact
	      of  clustering,  such as selecting only files from the beginning
	      of a list sorted by modification date, or sorted by alphabetical
	      order.  The  randomization process is deterministic, so training
	      of the same list of files with the same parameters will lead  to
	      the creation of the same dictionary.

       --dictID=#
	      A	 dictionary  ID	 is  a locally unique ID. The decoder will use
	      this value to verify it is using the right  dictionary.  By  de‐
	      fault,  zstd will create a 4-bytes random number ID. It's possi‐
	      ble to provide an explicit number ID instead.  It's  up  to  the
	      dictionary  manager to not assign twice the same ID to 2 differ‐
	      ent dictionaries. Note that short numbers have an advantage:  an
	      ID  <  256 will only need 1 byte in the compressed frame header,
	      and an ID < 65536 will only need 2 bytes. This  compares	favor‐
	      ably to 4 bytes default.

	      Note  that RFC8878 reserves IDs less than 32768 and greater than
	      or equal to 2\^31, so they should not be used in public.

       --train-cover[=k#,d=#,steps=#,split=#,shrink[=#]]
	      Select parameters for the default dictionary  builder  algorithm
	      named  cover. If d is not specified, then it tries d = 6 and d =
	      8. If k is not specified, then it	 tries	steps  values  in  the
	      range  [50,  2000].  If steps is not specified, then the default
	      value of 40 is used. If split is not specified or	 split	<=  0,
	      then  the default value of 100 is used. Requires that d <= k. If
	      shrink flag is not used, then the default value  for  shrinkDict
	      of 0 is used. If shrink is not specified, then the default value
	      for shrinkDictMaxRegression of 1 is used.

	      Selects segments of size k with highest score to put in the dic‐
	      tionary.	The  score  of a segment is computed by the sum of the
	      frequencies of all the subsegments of size d. Generally d should
	      be in the range [6, 8], occasionally up to 16, but the algorithm
	      will run faster with d <= 8. Good values for k vary widely based
	      on  the  input data, but a safe range is [2 * d, 2000]. If split
	      is 100, all input samples are used for both training and testing
	      to  find	optimal	 d  and k to build dictionary. Supports multi‐
	      threading if zstd is compiled  with  threading  support.	Having
	      shrink  enabled takes a truncated dictionary of minimum size and
	      doubles in size until compression ratio of the truncated dictio‐
	      nary is at most shrinkDictMaxRegression% worse than the compres‐
	      sion ratio of the largest dictionary.

	      Examples:

	      zstd --train-cover FILEs

	      zstd --train-cover=k=50,d=8 FILEs

	      zstd --train-cover=d=8,steps=500 FILEs

	      zstd --train-cover=k=50 FILEs

	      zstd --train-cover=k=50,split=60 FILEs

	      zstd --train-cover=shrink FILEs

	      zstd --train-cover=shrink=2 FILEs

       --train-fastcover[=k#,d=#,f=#,steps=#,split=#,accel=#]
	      Same as cover but with extra parameters f and accel and  differ‐
	      ent  default  value  of split If split is not specified, then it
	      tries split = 75. If f is not specified, then it tries f	=  20.
	      Requires	that  0	 <  f < 32. If accel is not specified, then it
	      tries accel = 1. Requires that 0 < accel <= 10. Requires that  d
	      = 6 or d = 8.

	      f	 is log of size of array that keeps track of frequency of sub‐
	      segments of size d. The subsegment is hashed to an index in  the
	      range  [0,2^f  - 1]. It is possible that 2 different subsegments
	      are hashed to the same index, and they  are  considered  as  the
	      same  subsegment	when computing frequency. Using a higher f re‐
	      duces collision but takes longer.

	      Examples:

	      zstd --train-fastcover FILEs

	      zstd --train-fastcover=d=8,f=15,accel=2 FILEs

       --train-legacy[=selectivity=#]
	      Use legacy dictionary builder algorithm with the	given  dictio‐
	      nary  selectivity	 (default:  9).	 The  smaller  the selectivity
	      value, the denser the dictionary, improving its  efficiency  but
	      reducing its achievable maximum size. --train-legacy=s=# is also
	      accepted.

	      Examples:

	      zstd --train-legacy FILEs

	      zstd --train-legacy=selectivity=8 FILEs

BENCHMARK
       The zstd CLI provides a benchmarking mode that can be  used  to	easily
       find  suitable  compression parameters, or alternatively to benchmark a
       computer's performance. zstd -b [FILE(s)] will benchmark zstd for  both
       compression  and	 decompression	using  default compression level. Note
       that results are very dependent on the content being  compressed.  It's
       possible	 to pass multiple files to the benchmark, and even a directory
       with -r DIRECTORY. When no FILE is provided, the benchmark will	use  a
       procedurally generated lorem ipsum text.

       •   -b#: benchmark file(s) using compression level #

       •   -e#:	 benchmark file(s) using multiple compression levels, from -b#
	   to -e# (inclusive)

       •   -d:	benchmark  decompression  speed	 only  (requires  providing  a
	   zstd-compressed content)

       •   -i#:	 minimum  evaluation time, in seconds (default: 3s), benchmark
	   mode only

       •   -B#, --block-size=#: cut file(s) into independent chunks of size  #
	   (default: no chunking)

       •   -S:	output	one benchmark result per input file (default: consoli‐
	   dated result)

       •   -D dictionary benchmark using dictionary

       •   --priority=rt: set process priority to real-time (Windows)



       Beyond compression levels, benchmarking is also compatible  with	 other
       parameters,  such  as number of threads (-T#), advanced compression pa‐
       rameters (--zstd=###), dictionary compression (-D dictionary), or  even
       disabling checksum verification for example.

       Output Format: CompressionLevel#Filename: InputSize -> OutputSize (Com‐
       pressionRatio), CompressionSpeed, DecompressionSpeed

       Methodology: For speed measurement, the entire input is	compressed/de‐
       compressed  in-memory  to measure speed. A run lasts at least 1 sec, so
       when files are small, they are  compressed/decompressed	several	 times
       per run, in order to improve measurement accuracy.

SEE ALSO
       zstdgrep(1), zstdless(1), gzip(1), xz(1)

       The  zstandard format is specified in Y. Collet, "Zstandard Compression
       and	   the	       'application/zstd'	  Media		Type",
       https://www.ietf.org/rfc/rfc8878.txt,   Internet	  RFC  8878  (February
       2021).

BUGS
       Report bugs at: https://github.com/facebook/zstd/issues

AUTHOR
       Yann Collet



zstd 1.5.6			 October 2024			       ZSTD(1)

ZSTDLESS(1)			 Команды пользователя			   ZSTDLESS(1)

NAME
       zstdless - просмотр файлов, сжатых Zstandard

SYNOPSIS
       zstdless [flags] [file ...]

DESCRIPTION
       zstdless запускает less(1) на файлах или stdin, если аргумент файла не указан,
       после декомпрессии их с помощью zstdcat(1).

SEE ALSO
       zstd(1)

zstd 1.5.6			  Март 2024			   ZSTDLESS(1)
ZSTDLESS(1)			 User Commands			   ZSTDLESS(1)



NAME
       zstdless - view zstandard-compressed files

SYNOPSIS
       zstdless [flags] [file ...]

DESCRIPTION
       zstdless	 runs less(1) on files or stdin, if no file argument is given,
       after decompressing them with zstdcat(1).

SEE ALSO
       zstd(1)



zstd 1.5.6			  March 2024			   ZSTDLESS(1)

ZSTDGREP(1)			 User Commands			   ZSTDGREP(1)



NAME
       zstdgrep - вывод строк, соответствующих шаблону, в файлах, сжатых с помощью Zstandard

SYNOPSIS
       zstdgrep [grep-flags] [--] pattern [files ...]

DESCRIPTION
       zstdgrep запускает grep(1) на файлах, или на stdin, если аргумент files не указан,
       после декомпрессии их с помощью zstdcat(1).

       Аргументы grep-flags и pattern передаются grep(1). Если в grep-flags найден флаг -e,
       zstdgrep не будет искать аргумент pattern.

       Обратите внимание, что современные альтернативы grep, такие как ripgrep (rg(1)), поддерживают
       файлы, сжатые zstd, из коробки, и могут быть лучшими альтернативами zstdgrep, особенно для
       неподдерживаемых сложных поисков шаблонов. Однако такие альтернативы также могут иметь некоторые
       незначительные различия в командной строке.

EXIT STATUS
       В случае отсутствия аргументов или отсутствия шаблона, будет возвращено 1,
       в противном случае 0.

SEE ALSO
       zstd(1)

AUTHORS
       Thomas Klausner wiz@NetBSD.org



zstd 1.5.6			  March 2024			   ZSTDGREP(1)
ZSTDGREP(1)			 User Commands			   ZSTDGREP(1)



NAME
       zstdgrep - print lines matching a pattern in zstandard-compressed files

SYNOPSIS
       zstdgrep [grep-flags] [--] pattern [files ...]

DESCRIPTION
       zstdgrep runs grep(1) on files, or stdin if no files argument is given,
       after decompressing them with zstdcat(1).

       The grep-flags and pattern arguments are passed on to grep(1). If an -e
       flag  is	 found in the grep-flags, zstdgrep will not look for a pattern
       argument.

       Note that modern grep alternatives  such	 as  ripgrep  (rg(1))  support
       zstd-compressed files out of the box, and can prove better alternatives
       than zstdgrep notably for unsupported complex  pattern  searches.  Note
       though  that such alternatives may also feature some minor command line
       differences.

EXIT STATUS
       In case of missing arguments or missing pattern, 1  will	 be  returned,
       otherwise 0.

SEE ALSO
       zstd(1)

AUTHORS
       Thomas Klausner wiz@NetBSD.org



zstd 1.5.6			  March 2024			   ZSTDGREP(1)