Skip to content

Zelin2001/zst_compress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zst_compress

Crates.io Downloads (latest version) Crates.io License Crates.io Version GitHub Release GitHub Release Date

Batch compress to or decompress dir/*.tar.zst

Scope

  • Do zst batch compression within rust.
  • Simplify the work for team data maintainers.

Features

  • Glob Pattern Matching: Support for standard glob patterns (*, ?, []) for file inclusion/exclusion
  • Regular Expression Support: Optional regex patterns for advanced file filtering (requires regex feature)
  • Batch Processing: Efficiently process multiple files in a directory
  • Cross-platform: Works on Linux, Windows, and macOS

Optional Features

Feature Description Default
regex Enable regular expression pattern matching for advanced file filtering No

Installation

You could choose to install from pre-built binary or Build from source.

Install from pre-built binary

For Windows 10/11 systems

  1. Extract zst_compress-<version>.zip

    Put it into searching path if you like to.

  2. Change directory to the archive folder you are working with, open windows terminal and run zst_compress.exe -h and follow the instructions.

    If zst_compress.exe was not in Path, just run with absolute path.

For Linux systems

  1. Extract zst_compress-<version>.tar.zst with: tar -xvf zst_compress-<version>.tar.zst

    Put it into searching path if you like to.

  2. In terminal emulator, change directory to the archive folder you are working with, run zst_compress -h and follow the instructions.

Build from source

The program was brought with 🦀Rust and therefore can work with most Rust hosts.

This will work for Linux, Windows, macOS with different chips.

  1. Install Rust: follow the tutorial to install Rust.

  2. Install a Rust toolchain.

  3. Install zst_compress with cargo install --locked zst_compress.

  4. Now you are ready to run zst_compress -h.

Usage

Usage: zst_compress [OPTIONS] <DIRECTORY>

Arguments:
  <DIRECTORY>  Directory to start processing

Options:
  -n, --dryrun               Preview what would be done without executing
  -e, --exclude <PATTERN>    Exclude files matching glob pattern(s)
      --excludere <PATTERN>  Exclude files matching regex pattern(s)
  -x, --extract              Extract files (decompress mode)
  -f, --flag                 Create compression message file on the compression
  -i, --include <PATTERN>    Include files matching glob pattern(s) [default: *]
      --includere <PATTERN>  Include files matching regex pattern(s)
  -l, --leveldir <LEVEL>     Directory listing depth for logs in *_archive_filelist.txt [default: 4]
  -p, --preserve             Keep original (do not delete) files after compression
  -q, --quiet                Suppress output except errors (NO FUNCTION)
  -t, --target <DIRECTORY>   Output directory [default: DIRECTORY to start]
  -v, --verbose              Show detailed progress information (NO FUNCTION)
  -z, --zstdlevel <LEVEL>    Zstandard compress level, 1(fastest) to 22(smallest); [default: 3]
  -h, --help                 Print help
  -V, --version              Print version

About

Take advantage of tar and zstd in Windows, and do batch processes.

Topics

Resources

Stars

Watchers

Forks

Languages