Skip to main content

When to use filerepack vs zip vs jpegoptim vs qpdf

Evaluators often ask which tool to reach for. Short answer: filerepack is a lossless-first orchestrator that walks nested files inside Office documents and archives, then rewrites the container. Use a single specialized tool when you already know the format and want its flags directly.

NeedPrefer
Shrink a .docx / .xlsx / .pptx including embedded images and XMLfilerepack
Walk ZIP / 7z / RAR / tar and optimize members, then rewritefilerepack
One JPEG, with exact jpegoptim / jpegtran flagsjpegoptim / jpegtran
One PNG, with oxipng / zopflipng / pngquant flagsoxipng / pngquant
Lossless PDF rewrite onlyqpdf
Lossy PDF Distiller presetsGhostscript (gs) — also available via filerepack --lossy
Re-encode one videoffmpeg
Recursively process a mixed directory of documents, photos, and archivesfilerepack bulk

filerepack strengths

  • Nested walking: Office/OOXML, ZIP, 7z, RAR, tarballs, EPUB, JAR, APK, …
  • One CLI for images, PDFs, video, lossless audio, Parquet, SQLite, fonts
  • Safety: write to a temp file, verify, then os.replace; discard output that did not shrink
  • filerepack doctor prints OS-specific install commands for missing binaries

When another tool wins

  • jpegoptim / oxipng / qpdf / ffmpeg: you want that tool's full flag surface on a single file
  • 7-Zip / Info-ZIP: you are creating a new archive, not recompressing an existing tree
  • ImageMagick alone: you are converting formats, not shrinking in place