git404hub

what is compressor fr?

zetbaitsu/compressor — explained in plain English

Analysis updated 2026-06-24

7,219KotlinAudience · developerComplexity · 2/5LicenseSetup · easy

tl;dr

A Kotlin Android library that shrinks photo file sizes before uploading or storing them, with a one-liner API and customizable quality, resolution, output format, and maximum file-size constraints.

vibe map

mindmap
  root((compressor))
    What it does
      Shrink photo size
      Keep visual quality
    Configuration
      Target resolution
      Quality level
      Output format
      Max file size
    Tech
      Kotlin coroutines
      Android Gradle
    Audience
      Android developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Compress a user-selected photo before uploading it to a server to reduce bandwidth and storage costs.

VIBE 2

Resize images to a specific resolution and quality level before saving them locally on a device.

VIBE 3

Enforce a maximum file size on all shared images using a custom compression constraint.

what's the stack?

KotlinAndroidGradleCoroutines

how it stacks up fr

zetbaitsu/compressoraniyomiorg/aniyomireadyouapp/readyou
Stars7,2197,2867,132
LanguageKotlinKotlinKotlin
Setup difficultyeasyeasyeasy
Complexity2/52/52/5
Audiencedevelopergeneralgeneral

Figures from each repo's GitHub metadata at analysis time.

how do i run it?

Difficulty · easy time til it works · 5min
Use freely in commercial and open-source projects, attribution required when distributing modified versions.

in plain english

Compressor is an Android library that shrinks the file size of photos on a user's device. When someone takes a picture with their phone, the resulting image file can be several megabytes large. Compressor lets developers reduce that size before uploading, storing, or sharing the image, with the aim of keeping the visual quality close to the original. The library is written in Kotlin and designed to be added to an Android project with a single line in the build configuration. Basic use is a one-liner: pass the context and the image file, and get back a smaller compressed file. The library uses sensible defaults, so most projects can get started without configuration. For cases where the defaults are not enough, developers can customize the compression settings by specifying a target resolution, a quality level from 0 to 100, an output format such as JPEG or WebP, and a maximum file size in bytes. These constraints can be combined in any combination, and developers can also write their own custom constraints if they need behavior the library does not provide out of the box. One example shown in the documentation is a constraint that renames the output file to lowercase, which can be combined with the standard quality and format settings. The library uses Kotlin coroutines, which is the standard approach in modern Android development for running work off the main thread. Image compression can take noticeable time on large files, so doing it in a coroutine keeps the app responsive while the work runs in the background. The library also supports running compression on the main thread when needed, though the README implies this is less common. The project is licensed under the Apache 2.0 license, which permits use in both open-source and commercial applications.

prompts (copy fr)

prompt 1
Using the Compressor Kotlin library, write code to compress a photo to under 200KB before uploading it to Firebase Storage.
prompt 2
How do I use Compressor inside a Kotlin coroutine to compress an image in the background without blocking the UI thread?
prompt 3
Show me how to write a custom constraint in Compressor that limits output to JPEG format and renames the file to lowercase.

Frequently asked questions

what is compressor fr?

A Kotlin Android library that shrinks photo file sizes before uploading or storing them, with a one-liner API and customizable quality, resolution, output format, and maximum file-size constraints.

What language is compressor written in?

Mainly Kotlin. The stack also includes Kotlin, Android, Gradle.

What license does compressor use?

Use freely in commercial and open-source projects, attribution required when distributing modified versions.

How hard is compressor to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is compressor for?

Mainly developer.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.