# Overview
Compressify is an industrial-grade, client-side batch image optimization workstation. Designed for engineering teams and content creators who need to compress hundreds of photos without server rate limits or privacy leaks, Compressify introduces an innovative 2-Pass Pipeline Architecture with exact byte-level target sizing and format conversion (WebP, AVIF, JPG, PNG, SVG).
# 2-Pass Pipeline Architecture & Binary Search Engine
Compressify executes a fully non-blocking, multi-stage compression pipeline directly inside the browser using modern HTML5 Canvas and OffscreenCanvas APIs:
Pass 1: Pre-Analysis & Dimension Rescaling
Images are decoded into memory, stripped of bloat EXIF metadata, and scaled according to preset percentages (25% to 100%) or maximum dimension constraints.
Pass 2: Adaptive Encoding & Binary Search Exact Sizing
For target size mode, a binary search iteratively converges on optimal quality (0.01 to 1.0) within 7–9 iterations. If the encoded blob is smaller than the target, format-safe padding is applied to achieve exact byte-for-byte matching.
Anti-Inflation Safe Mode ('Already Optimal')
If compressing an already-optimized image results in a larger byte count, Compressify automatically retains the smaller original bytes to prevent file inflation.
In-Memory ZIP Streaming
Processes unlimited batches and packs them asynchronously into a single compressed ZIP archive using JSZip without consuming backend disk space.
# 1. The Three Compression Modes
# 2. Batch Workflows & Format Conversion
# Technical Specifications & Limits
| Parameter / Property | Specification / Value |
|---|---|
| Input Formats | PNG, JPG, JPEG, WebP, AVIF, SVG, BMP, GIF |
| Output Formats | Original, WebP, AVIF, JPG, PNG |
| Target Size Precision | Exact down to 1 Byte (Binary Search + Safe Padding) |
| Batch Capacity | Unlimited (bounded only by local device RAM) |
| Metadata Handling | Automatic EXIF & Color Profile Stripping |
| Archive Generation | In-Memory Client-Side ZIP (JSZip) |
# Keyboard Shortcuts & Pro Controls
# Developer Integration & Code Examples
async function compressToTarget(canvas, targetBytes, format = 'image/webp') {
let minQ = 0.05, maxQ = 0.98, bestBlob = null;
for (let i = 0; i < 8; i++) {
const midQ = (minQ + maxQ) / 2;
const blob = await new Promise(r => canvas.toBlob(r, format, midQ));
if (blob.size <= targetBytes) {
bestBlob = blob;
minQ = midQ; // Try higher quality
} else {
maxQ = midQ; // Reduce quality
}
}
return bestBlob;
}# Frequently Asked Questions
Why is AVIF compression slower than WebP?
Will my images be downscaled if I set an exact target size?
Is there any limit on the number of images in a batch?
Try Compressify - Batch Image Optimizer Now
Test features in your browser with zero installations, zero server uploads, and 100% free offline capabilities.
Open Interactive Tool