Compressor is a lightweight Android image compression library written in Kotlin.
The library solves the problem of reducing photo file sizes for mobile applications where bandwidth and storage are constrained. It compresses images to smaller sizes with minimal quality loss. The tool works by allowing developers to apply compression either with default settings or by defining custom constraints such as target quality, resolution, and format parameters. Compression operations run asynchronously using Kotlin coroutines, which can be called from a coroutine scope or executed on the main thread depending on application needs.
Compressor suits Android projects that need to handle user-generated photos, such as messaging apps, social platforms, or any application uploading images to a server. It is particularly valuable when you want to reduce bandwidth usage and storage requirements without requiring users to manually resize or optimize their photos. The library provides both simple one-line compression with sensible defaults and fine-grained control through custom constraint definitions for developers who need specific output parameters.
The project maintains active development with ongoing refinement of its compression pipeline and coroutine integration. The codebase includes test coverage to validate compression behavior across different scenarios. Documentation covers both basic usage patterns and advanced customization approaches, including examples of creating custom constraint implementations and extension functions.