Repository navigation
CLI Usage EN
zipax-bot edited this page Aug 11, 2026
·
1 revision
zipax-cli is the command-line entry point for the compression core, useful for testing and automation. It shares the same compression logic (zipax-core) as the desktop app.
cd zipax-cross
# show help
cargo run -q -p zipax-cli -- --helpPreview the compression result without writing files:
cargo run -q -p zipax-cli -- plan photo.jpg
cargo run -q -p zipax-cli -- plan photo.png --overwrite --output-format webp# default quality
cargo run -q -p zipax-cli -- compress photo.jpg --level 4
# convert to AVIF
cargo run -q -p zipax-cli -- compress photo.jpg --output-format avif --level 4
# limit dimensions
cargo run -q -p zipax-cli -- compress photo.jpg --max-width 128 --max-height 128cargo run -q -p zipax-cli -- compress photo.png --level 4
# convert to WebP with a 500KB target size
cargo run -q -p zipax-cli -- compress photo.png --output-format webp --target-size-kb 500cargo run -q -p zipax-cli -- compress a.png b.png --output-format webp| Flag | Description |
|---|---|
--level N |
Quality level 1–6 (default 3) |
--output-format <fmt> |
Output format: jpeg / png / webp / avif |
--max-width / --max-height |
Dimension limits (pixels) |
--target-size-kb N |
Target file size (KB) |
--overwrite |
Overwrite the original file |
cargo testBack to Home-EN · 中文版:CLI 使用
Language / 语言:
- 简体中文 · English
- Home
- Tech-Stack
- Architecture
- Compression-Engine
- Features
- Build-and-Release
- CLI-Usage
- Ghostscript-Install
- Release-History
- Docs-Index
- Home-EN
- Tech-Stack-EN
- Architecture-EN
- Compression-Engine-EN
- Features-EN
- Build-and-Release-EN
- CLI-Usage-EN
- Ghostscript-Install-EN
- Release-History-EN
- Docs-Index-EN