Leanify: lossless file optimizer

cool_penguin_smallLeanify is a cmdline utility to minimize or optimize files without any loss of quality. It removes redundant data like debug information, comments, metadata etc. from files.


  • Supports recursive minifying (e.g. a PNG inside an APK inside a ZIP).
  • Supports a wide variety of file formats.
  • Lightweight, one file, under 1MB, no external dependency.
  • Everything is done in memory, no temporary files.
  • Multiplatform. Supports Linux, Windows, Mac.
  • Supports recursive directory traversal.
  • Identifies file format by data instead of name.


  • APK
  • Epub, Comic book archive (.cbt, .cbz), FictionBook (.fb2, .fb2.zip)
  • MS Office formats (docx, pptx, xlsx). No support for Office 2003 and older formats.
  • GFT image container
  • tar, gzip, zip
  • Icon (.ico)
  • JAVA archive (.jar)
  • JPEG (.jpeg, .jpg, .jpe, .jif, .jfif, .jfi, .thm), PNG image (.png, .apng), SVG image (.svg, .svgz)
  • Lua object file (.lua, .luac)
  • OpenDocument (.odt, .ods, .odp, .odb, .odg, .odf)
  • PE file (.exe, .dll, .sys, .ocx, .scr, .cpl)
  • RDB archive (.rdb)
  • Flash file (.swf)
  • XML document (.xml, .xsl, .xslt)
  • XPInstall (.xpi)
  • XPS document (.xps, .oxps)
  • Planned: BMP, PDF, Microsoft Compound File Binary


Get the latest release for your architecture here.


Usage: Leanify [options] path1 path2 path3 ...
  -i <iteration>  More iterations means slower but better result. Default: 15.
  -d <max depth>  Maximum recursive depth.
  -f              Fast mode, no recompression.
  -q              Quiet mode, no output.
  -v              Verbose output.

Webpage: Leanify

Leave a Reply

Your email address will not be published. Required fields are marked *