A simple and efficient CLI tool for compressing and decompressing files using Brotli compression.
This project was built using Bun, a fast all-in-one JavaScript runtime, ensuring quick startup times and efficient dependency management.
- Compress Files: Use Brotli compression for compact and efficient storage.
- Decompress Files: Restore compressed files to their original state.
- Custom File Format: Compressed files are saved with a
.dost
extension, preserving metadata such as the original file name.
- Bun Runtime: Version
1.1.42
or newer is recommended. Install Bun by following the instructions at bun.sh.
-
Clone the repository:
git clone <repository-url> cd dost
-
Install dependencies:
bun install
bun run index.js comp <file>
Example:
bun run index.js comp example.txt
- Compresses
example.txt
intoexample.dost
.
bun run index.js decomp <file>
Example:
bun run index.js decomp example.dost
- Decompresses
example.dost
and restores the original file.
- The file content is compressed using Brotli, with maximum compression settings (
quality: 11
,window size: 22
). - Metadata (original file name) is stored alongside the compressed data in the
.dost
file.
- The
.dost
file is parsed to extract metadata and the compressed content. - Brotli decompression is applied to restore the original file.
This project was initialized with:
bun init
- Lightning-fast installation and execution.
- Built-in TypeScript and JavaScript support.
- All-in-one tooling for modern JavaScript applications.
Contributions are welcome! If you encounter issues or have ideas for improvements, feel free to submit a pull request or open an issue.
This project is licensed under the MIT License.
- Built with 💙 using Bun.
- Compression powered by Brotli from Node.js's
zlib
module.