BookmarkedTools LogoBookmarkedTools
Official DocumentationGraphics & Design8 min read• Updated August 2026

Compressify Documentation — 2-Pass Batch Image Optimizer Guide

Technical deep dive into Compressify's 2-Pass compression pipeline, exact target file size binary search matching, and batch ZIP archiving.

# 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).

100% Client-Side Architecture: All operations execute inside your browser's V8 engine and Canvas sandbox. Zero files, color swatches, or code payloads are sent to external servers.

# 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

Compressify provides three distinct optimization strategies tailored to different use cases: 1. **Balanced Quality Mode**: - Uses an intuitive quality slider (10% to 100%) with perceptual loss suppression. - Ideal for general web publishing, blog assets, and ecommerce catalogs. 2. **Exact Target File Size Mode (KB/MB)**: - Enter your desired size (e.g. `500 KB` or `1.2 MB`). - The Binary Search algorithm adjusts compression parameters to hit the target with 99.9% precision, padding if necessary for strict portal upload requirements (government forms, exam portals, app store submissions). 3. **True Lossless Mode**: - Retains 100% pixel fidelity while removing metadata, color profiles, and optimizing DEFLATE tables.

# 2. Batch Workflows & Format Conversion

- **Multi-File Ingestion**: Drag and drop dozens of images or folders at once. - **Format Transcoding**: Convert any batch between **WebP**, **AVIF**, **JPG**, **PNG**, or **SVG**. - **Side-by-Side Split Preview**: Interactive visual slider comparing original vs compressed image at 100% zoom. - **One-Click Batch ZIP Download**: Generates a unified archive with original file names preserved or cleanly renamed.

# Technical Specifications & Limits

Parameter / PropertySpecification / Value
Input FormatsPNG, JPG, JPEG, WebP, AVIF, SVG, BMP, GIF
Output FormatsOriginal, WebP, AVIF, JPG, PNG
Target Size PrecisionExact down to 1 Byte (Binary Search + Safe Padding)
Batch CapacityUnlimited (bounded only by local device RAM)
Metadata HandlingAutomatic EXIF & Color Profile Stripping
Archive GenerationIn-Memory Client-Side ZIP (JSZip)

# Keyboard Shortcuts & Pro Controls

Paste image(s) directly from clipboardCtrl + V / Cmd + V
Download entire batch as ZIPCtrl + S / Cmd + S
Close modal / Split-screen previewEsc

# Developer Integration & Code Examples

Client-Side Canvas Binary Search Sizing (Conceptual)
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