A high-performance PDF compression desktop application built with Wails (Go + Web) and Preact frontend. macOS-only (Intel + Apple Silicon) with Ghostscript bundled inside the app.
- 📄 Advanced PDF Compression: Compression using embedded Ghostscript
- 🖥️ Native Desktop Experience: Built with Wails for seamless desktop integration
- 📁 Batch Processing: Compress multiple PDF files simultaneously with concurrent processing
- ⚙️ Configurable Settings: Multiple compression levels and advanced options
- 📊 Statistics Tracking: Session and lifetime statistics for files compressed and data saved
- Backend: Go 1.25 with Wails v2 framework
- Frontend: Preact + TypeScript + Vite for fast, lightweight UI
- Desktop Runtime: Wails (native Go binaries)
- PDF Compression: Ghostscript 10.05.1 (embedded binary)
- Database: SQLite with GORM for data persistence
- Styling: Tailwind CSS with custom PDF-themed design
- Build Tools: Wails CLI, Vite, Go modules
- Package Manager: pnpm for frontend dependencies
- Concurrent Processing: Multi-threaded compression (up to 8 cores)
- Direct File Processing: No temporary file copying - Ghostscript reads original and writes compressed directly
- Bundle Size: Small native binary with embedded resources
- Startup Time: Native binary execution with minimal overhead
- Go 1.25 or later
- Node.js 19+
- pnpm (recommended) or npm
- Wails CLI (
go install github.com/wailsapp/wails/v2/cmd/wails@latest)
-
Clone the repository:
git clone <repository-url> cd compressor
-
Install dependencies:
go mod tidy cd frontend && pnpm install && cd ..
Start the application in development mode:
wails devThis will:
- Start the Go backend integrated with Wails
- Launch the native application with hot reload
- Enable frontend development tools
Generate bindings after Go changes:
wails generate modulewails buildThis creates a macOS app in the build/ directory.
This app uses architecture-specific Ghostscript binaries directly embedded from GitHub releases. The binary is automatically downloaded and embedded during build time using Go's go:generate feature.
The appropriate binary for your system architecture is automatically downloaded during build:
# Generate the binary (happens automatically during build)
go generate ./internal/binarySupported architectures:
- Apple Silicon (arm64):
ghostscript-10.05.1-macos-arm64 - Intel Macs (amd64):
ghostscript-10.05.1-macos-x86_64
The binary is embedded directly into the application using Go's embed package, eliminating the need for complex archive extraction.
