JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 121
  • Score
    100M100P100Q71665F
  • License MIT

๐Ÿ”ฌ Reliable, Cross-Platform Compression & Decompression for Web, Node.js, Deno, and Bun

Package Exports

  • compress-kit

Readme

banner

compress-kit

Reliable, Cross-Platform Compression & Decompression
for Web, Node.js, Deno, and Bun

License npm version npm downloads stars

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, and deno. 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!