Compression Library Benchmark is an interactive web app to benchmark and compare popular JavaScript compression and serialization libraries. Instantly see how FFLATE, Pako, LZString, CBOR, and MessagePack stack up on speed and compression using either a built-in 1MB payload or your own files.
-
β‘ One-Click Benchmarking:
Instantly compare multiple libraries. -
π¦ Flexible Payloads:
Use the default 1MB JSON or upload your own text file. -
π Detailed Results Table:
View original and compressed sizes (KB), encode/decode times (ms), total operation times, compression ratios, and size reductionβall side by side. -
π Live Payload Preview:
See your loaded payload and its size before benchmarking.
| π·οΈ Library | π Description |
|---|---|
| FFLATE | Fast, efficient DEFLATE/GZIP |
| Pako | Popular zlib port for browsers |
| LZString | Lightweight string compression |
| CBOR | Concise Binary Object Representation |
| MessagePack | Efficient binary serialization |
-
Clone the repo:
git clone https://github.com/ChiragChrg/compression-library-benchmark.git cd compression-library-benchmark -
Install dependencies:
npm install
-
Run the app:
npm run dev
Open
http://localhost:5173in your browser.
.
βββ public/ # Static assets
βββ src/ # Source code
β βββ assets/ # Images and icons
β βββ utils/ # Utility functions
β βββ App.tsx # Main app component
β βββ main.tsx # Entry point
βββ package.json # Project metadata and scripts
βββ vite.config.ts # Vite configuration
βββ README.md # This file
Contributions, issues, and feature requests are welcome!
Whether you want to add new compression libraries, fix bugs, or improve the user experience, feel free to open an issue or submit a pull request.
Want to add a new compression library? Check out our detailed Contributing Guide for step-by-step instructions.
This project is licensed under the MIT License.
You are free to use, modify, and share this project, as long as you include the original copyright.
Β© 2025 ChiragChrg β All rights reserved under MIT.