module
0.0.0-20250218210234-b6aeb2f04b27
Repository: https://github.com/rokath/tip.git
Documentation: pkg.go.dev
# README
TiP - Tiny Packer for small buffers
+ Compress small buffers fast and efficient with Zeroes Elemination. +
--> Works with big buffers too but will not compress like established zip tools ❗
Table of Contents
(click to expand)
1. Project Status
--> Early experimental state!
- Pack & Unpack works in a first implementation
idTable.c
generation also ok, but the generated table might not be optimal.
2. About The Project
- Usual compressors cannot succeed on small data, because they add a translation table into the data.
- TiP is an adaptable small buffer packer suitable for embedded devices. Like COBS it removes all zeroes from the data, but additionally tries data compression.
- COBS adds 1 byte overhead per each starting 255 bytes.
- The TiP worst-case overhead is 1 byte per each starting 7 bytes for uncompressable data.
- Like TCOBS, TiP can already compress 3 bytes into 2 bytes but is expected to do better in a general way.
2.1. TiP Components
- PC apps:
tig
- tiny generator to create a suitableidTable.c
filetip
- tiny pack using the pack C code mainly for teststiu
- tiny unpack using the unpack C code mainly for tests
- Tiny C-Code usable on embedded devices inside src folder containing
3. Getting Started
3.1. Prerequisites
- For now install Go to easily build the executables.
- You need some files containing typical data you want to pack and unpack.
- Just to try out TiP, you can use a folder containing ASCII texts.
3.2. Built TipTable Generator tig
cd tig && go build -ldflags "-w" ./...
- Run
tig
on the data files to get anidTable.c
file.
3.3. Build tip
and tiu
- Copy the generated
idTable.c
file into thesrc
folder. - Run
go build ./...
orgo install ./...
.
3.4. Try tip
and tiu
- Run
tip -i myFile -v
to getmyFile.tip
. - Run
tiu -i myFile.tip -v
to getmyFile.tip.untip
. myFile
andmyFile.tip.untip
are expected to be equal.
3.5. Installation
- Add
src
folder to your project and compile. pack.h
andunpack.h
is the user interface.
4. Usage
Please refer to the Tip User Manual (not written yet)
5. Roadmap
- Create
tipTable.h
GeneratortipTable
. - Create
pack.c
andunpack.c
and test. - Improve
tipTable.h
GeneratortipTable
. - Write Tip User Manual.
- Write fuzzy tests.
- Remove 255 bytes limitation.
- Improve implementation for less RAM usage.
See the open issues for a full list of proposed features (and known issues).
6. Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
6.1. Top contributors
7. License
Distributed under the MIT License. See LICENSE.txt
for more information.
8. Contact
Thomas Höhenleitner - [email protected]
Project Link: https://github.com/rokath/tip
9. Acknowledgments
- COBS
- to do
- todo
- to do