Categorygithub.com/rokath/tip
module
0.0.0-20250218210234-b6aeb2f04b27
Repository: https://github.com/rokath/tip.git
Documentation: pkg.go.dev

# README

GitHub issues GitHub downloads GitHub code size in bytes GitHub watchers PRs Welcome Go Report Card


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.

(back to top)

2.1. TiP Components

  • PC apps:
    • tig - tiny generator to create a suitable idTable.c file
    • tip - tiny pack using the pack C code mainly for tests
    • tiu - tiny unpack using the unpack C code mainly for tests
  • Tiny C-Code usable on embedded devices inside src folder containing

(back to top)

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 an idTable.c file.

3.3. Build tip and tiu

  • Copy the generated idTable.c file into the src folder.
  • Run go build ./... or go install ./....

3.4. Try tip and tiu

  • Run tip -i myFile -v to get myFile.tip.
  • Run tiu -i myFile.tip -v to get myFile.tip.untip.
  • myFile and myFile.tip.untip are expected to be equal.

3.5. Installation

  • Add src folder to your project and compile.
  • pack.h and unpack.h is the user interface.

(back to top)

4. Usage

Please refer to the Tip User Manual (not written yet)

(back to top)

5. Roadmap

  • Create tipTable.h Generator tipTable.
  • Create pack.c and unpack.c and test.
  • Improve tipTable.h Generator tipTable.
  • 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).

(back to top)

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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

6.1. Top contributors

contrib.rocks image

7. License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

8. Contact

Thomas Höhenleitner - [email protected]

Project Link: https://github.com/rokath/tip

(back to top)

9. Acknowledgments

  • COBS
  • to do
  • todo
  • to do

(back to top)

# Packages

No description provided by the author
No description provided by the author