Package Exports
- compress-kit
Readme
About ๐
compress-kit is a modern compression toolkit for Web, Node.js, Deno, and Bun.
It offers a simple, consistent API for compressing and decompressing strings or objects, automatically deciding when compression is beneficial, while ensuring lossless results and type safety.
Features ๐
- ๐ Strong Compression โ Achieves size reductions of ~30% to 90% on typical text and JSON data using the Deflate algorithm via pako.
- ๐ง Smart Compression โ Automatically detects whether to store data compressed or uncompressed for optimal efficiency.
- ๐ Cross-Platform โ Works seamlessly in Web, Node.js, Deno, and Bun with no code changes.
- ๐ Lossless Algorithms โ Ensures perfect reconstruction of the original data.
- ๐งช Strict Validation &
Result<T>Typing โ Unified return type and robust input checks for predictable results.
Installation ๐ฅ
npm install compress-kit๐ก Works with
npm,pnpm,yarn,bun, anddeno. You can use it in dev dependencies since it's typically used only for local HTTPS.
Credit ๐ช๐ฝ
We want to thank Pako for the inflate and deflate algorithms used in this package.
Contributions ๐ค
Want to contribute or suggest a feature?
- Open an issue or feature request
- Submit a PR to improve the packages or add new ones
- Star โญ the repo if you like what you see
License ๐
This project is licensed under the MIT License.
Thank you!