DEV Community

S B
S B

Posted on

I built a free file compressor that never uploads your files, and checks its own quality

Every week I compress something: screenshots for a deck, a scanned PDF that bounces off an email limit, a phone video for a client. Every time, the options were the same. Upload my file to a site I don't know, wait, and hope the result doesn't look worse. So I built Avido, a compressor that runs entirely in your browser.

Your files never leave your device

Avido is a static website. All the compression happens on your machine using WebAssembly builds of the same codecs professionals use: MozJPEG for photos, libimagequant (the engine behind pngquant) and OxiPNG for PNGs, libwebp and AVIF for modern formats, and Gifsicle for animated GIFs. Videos use your device's hardware encoder through the WebCodecs API. There is no upload, so there is no waiting and nothing to leak.

It measures quality instead of guessing

Most compressors ask you to pick a quality number like 75. The right number is different for every image. Avido's Smart mode encodes each image several times and scores each attempt against the original with SSIM, a perceptual similarity measure. It keeps the smallest file that still clears your fidelity target. If nothing smaller looks as good, you get your original back.

In my tests, a 367 KB PNG screenshot dropped to 110 KB (70% smaller) and a 2.4 MB PNG illustration to about 200 KB (over 90% smaller), with no visible difference.

Video: codec agents

For video, Avido runs one "agent" per codec your device supports: H.264, HEVC and AV1. Each agent encodes short samples from the start, middle and end of your video at different bitrates, decodes them, and compares frames to the original. The lowest bitrate that passes wins, and only then is the full video encoded. If you need maximum compatibility, you can lock it to H.264.

PDFs without blurry text

Most of a PDF's weight is embedded photos and scans. Avido recompresses only those images and packs the file's structure. Text and vector graphics are never turned into pictures, so they stay sharp and selectable. A 1.7 MB test document with two large photos came out at 130 KB.

AI upscaling, also on-device

The same page can enlarge images 2× or 4×, and low-resolution videos 2×, with an ESRGAN neural network running on your graphics chip through TensorFlow.js.

Batch everything

Drop a whole folder of hundreds of files. Up to three compress in parallel, with pause, retry and a time estimate, and the ZIP keeps your folder structure.

What I learned building it

  1. The browser is now a serious media workstation. WebAssembly codecs and WebCodecs hardware encoding are fast enough for real work.
  2. Measuring beats guessing. A perceptual check per file saves more bytes than any fixed quality setting, and it protects against the occasional ugly result.
  3. Privacy is a feature people notice. "Nothing is uploaded" is the first thing testers mention.

Avido is free, with no signup and no watermark: aivdo.io. I'd love feedback, especially files where it does worse than the tool you use today.

— Shub, maker of Avido

Top comments (0)