https://github.com/b-jure/tight
make your files TIGHT
https://github.com/b-jure/tight
c c99 compression decompression gnu-linux huffman-coding lzw
Last synced: 5 months ago
JSON representation
make your files TIGHT
- Host: GitHub
- URL: https://github.com/b-jure/tight
- Owner: b-jure
- License: gpl-3.0
- Created: 2024-07-12T05:00:55.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-08-09T18:22:05.000Z (almost 2 years ago)
- Last Synced: 2025-03-14T01:16:11.014Z (about 1 year ago)
- Topics: c, c99, compression, decompression, gnu-linux, huffman-coding, lzw
- Language: C
- Homepage:
- Size: 146 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
### About
`TIGHT` is a lossless file compression library and a binary written in C (C99)
compatible mostly with (and only tested on) GNU/Linux.
Two main algorithms used for compressing are [Huffman coding](https://en.wikipedia.org/wiki/Huffman_coding)
and [LZW](https://en.wikipedia.org/wiki/Lempel%E2%80%93Ziv%E2%80%93Welch), best possible compression
results are achieved by first compressing files with `LZW` then generating `Huffman` codes on top of it.
That is exactly how the `tight` binary preforms full compression.
**Note: run-length-encoding (`LZW`) is not yet implemented.**
`TIGHT` is not meant to be a replacement for any of the already established and much more
fine tuned, smarter implementations of mentioned compression algorithms, instead it is a naive
implementation intended for educational purposes. Source code is kept minimal
and is easy to read (I hope).
---
#### TODO
- Implement Vitter algorithm.
- Implement RLE LZW algorithm.
- Combine Vitter and LZW in order to read the file only once.
- Make the library portable on OSes defined in `tinternal.h`
---
### Build
Clone the repo:
```sh
git clone https://github.com/b-jure/TIGHT.git
cd TIGHT
```
Build as `tight` binary:
```sh
make
```
Build as `libtight.so` shared library:
```sh
make library
```
Build as `libtight.a` archive:
```sh
make archive
```
---
### Install & Uninstall
Note: add `sudo` in front of `make` if needed.
Install/Uninstall `tight` binary:
```sh
make install
make uninstall
```
Install/Uninstall `libtight.so` shared library:
```sh
make install-lib
make uninstall-lib
```