Skip to content

Dann1y/squisher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Squisher

Compress PDFs/PNGs/SVGs and batch-convert images — all from a TUI.

Rust

Features

Compress Mode

  • PDF — Stream recompression (zlib level 9), unused object cleanup, metadata stripping, stream deduplication
  • PNG — Lossless optimization via oxipng
  • SVG — Whitespace removal, attribute shortening, decimal precision reduction
  • Interactive TUI — File browser, quality selector, real-time progress

Convert Mode

  • Batch image conversion — Recursively scan a folder and convert all images
  • Input formats — JPG, PNG, HEIC, WebP
  • Output formats — JPG, PNG, WebP
  • Size presets — Large (1920px), Medium (1280px), Small (640px)
  • HEIC support — macOS sips for HEIC decoding
  • Parallel processing — Uses all CPU cores
  • Structure preserved — Subdirectory layout maintained in {folder}_converted/

Installation

git clone https://github.com/Dann1y/pdf_squish.git
cd pdf_squish
cargo build --release

The binary will be at target/release/pdf-squish.

Usage

# Launch TUI
cargo run --release

# Pre-fill input path
cargo run --release -- /path/to/file.pdf

TUI Controls

Key Action
Ctrl+T Toggle Compress / Convert mode
Tab / Shift+Tab Cycle focus
Enter Load files / Start
1 2 3 Compress: Quality — Convert: Output format
4 5 6 Convert: Size preset
j k / Navigate file list
d Remove selected file
r Reset after completion
q Quit

Compression Levels (PDF)

Strategy Light Standard Aggressive
Stream recompression (zlib best)
Empty stream removal
Unused object cleanup
Metadata stripping
Object renumbering
Duplicate stream dedup

Dependencies

License

MIT

About

Rust TUI for compressing and converting files — PDF, PNG, SVG, and images.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages