Home

Awesome

TCOBS v1 & v2

<!-- TABLE OF CONTENTS --> <details> <summary>Table of Contents</summary> <ol> <!-- Use Shift-Ctrl-P "Generate TOC for Markdown to get the automatic numbering. --> <!-- Use Shift-Ctrl-P "Markdown All in Once: Create Table of Contence" to get correct links in the TOC. Delete the old one. --> <!-- vscode-markdown-toc --> <!-- vscode-markdown-toc-config numbering=true autoSave=true /vscode-markdown-toc-config --> <!-- /vscode-markdown-toc --> <div id="top"></div></ol></details> <!-- πŸŸ’βœ…πŸŸ‘β›”πŸ”΄πŸ”΅πŸ’§β“β†©ΰ·΄βš“πŸ›‘β—πŸŒ‘β±βˆ‘βœ³β€Όβ™¦β™£πŸš«βš πŸŽ₯πŸ“·πŸŒŠπŸ†˜πŸ§·πŸ’βž‘β˜• ![GitHub Workflow Status](https://img.shields.io/github/workflow/status/rokath/tcobs/goreleaser) ![GitHub release (latest by date)](https://img.shields.io/github/v/release/rokath/tcobs) ![GitHub commits since latest release](https://img.shields.io/github/commits-since/rokath/tcobs/latest) -->

GitHub All Releases GitHub code size in bytes GitHub watchers Go Report Card PRs Welcome test Coverage Status GitHub issues

<!-- ABOUT THE PROJECT -->

1. <a name='AboutTheproject'></a>About The project

./docs/ref/COBSDataDisruption.svg

1.1. <a name='Assumptions'></a>Assumptions

<p align="right">(<a href="#top">back to top</a>)</p>

2. <a name='Preface'></a> Preface

2.1. <a name='Whynotin2steps'></a> Why not in 2 steps?

<p align="right">(<a href="#top">back to top</a>)</p>

3. <a name='DataDisruptionHandling'></a>Data Disruption Handling

<p align="right">(<a href="#top">back to top</a>)</p>

4. <a name='CurrentState'></a>Current State

PropertyTCOBSv1TCOBSv2
Code amount🟒 less🟑 more
Speed assumption (not measured yet)🟒 faster🟒 fast
Compression on short messages from 2 bytes length🟒 yes🟒 yes
Compression on messages with many equal bytes in a row🟑 good🟒 better
Encoding C language support🟒 yes🟒 yes
Decoding C language support🟒 yes🟒 yes
Encoding Go language support🟑 yes with CGO🟑 yes with CGO
Decoding Go language support🟒 yes🟑 yes with CGO
Other language supportπŸ†˜ NoπŸ†˜ No
<p align="right">(<a href="#top">back to top</a>)</p>

5. <a name='Usecases'></a>Use cases

<p align="right">(<a href="#top">back to top</a>)</p>

6. <a name='TCOBSSpecification'></a>TCOBS Specification

6.1. <a name='TCOBSv1Specification'></a>TCOBSv1 Specification

↩ See ./docs/TCOBSv1Specification.md.

6.2. <a name='TCOBSv2Specification'></a>TCOBSv2 Specification

↩ See ./docs/TCOBSv2Specification.md.

<p align="right">(<a href="#top">back to top</a>)</p>

7. <a name='GettingStarted'></a>Getting Started

7.1. <a name='FolderOverview'></a>Folder Overview

NameContent
v1This is a pure Go TCOBSv1 package. Only decoding is supported. Usable in Go apps, which only need to decode. One example is trice. The Go files inside this folder are copied from Cv1.
Cv1This is the with C-sources and tests extended v1 folder. It provides a TCOBSv1 Go encoding and decoding using CGO. The C-files are direct usable in an embedded project.
Cv2Here are the TCOBSv2 C-sources usable in an embedded project. The Go-files are the CGO adaption and the Go tests for TCOBSv2.

7.2. <a name='TCOBSv1Goonlydecode'></a>TCOBSv1 Go only decode

7.3. <a name='TCOBSv1andTCOBSv2GowithCGOencodeanddecode'></a>TCOBSv1 and TCOBSv2 Go with CGO encode and decode

7.4. <a name='TCOBSv1andTCOBSv2Cencodeanddecode'></a>TCOBSv1 and TCOBSv2 C encode and decode

<p align="right">(<a href="#top">back to top</a>)</p> <!-- ROADMAP -->

8. <a name='Roadmap'></a>Roadmap

See the open issues for a full list of proposed features (and known issues).

<p align="right">(<a href="#top">back to top</a>)</p>

9. <a name='Futureimprovements'></a>Future improvements?

❓ One could think that arbitrary byte buffer examples could be analyzed concerning the statistical usage of bytes and find that 0xFC...0xFF and 0x00...0x20 are used more often than 0xBD for example. This would allow to code some bytes with 5 bits and others with 11 bits creating a universal table, like huffman encoding. This table than is commonly used and the need to pack it into the compressed buffer disappears. Maybe some 2-byte sequences get also in this table and the table code could get enhanced with run-length codes.

❓ Several such "universal" tables are thinkable and during compression the encoder decides which "universal" table fits best for a specific short buffer. Then the table index must get into the compressed data.

❗ Because these "universal" tables then must reside together with the encoder and the decoder, this will increase the needed code space significantly. Alternatively these tables reside accessible outside the embedded device.

<p align="right">(<a href="#top">back to top</a>)</p>

10. <a name='Contributing'></a>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

Working on your first Pull Request? You can learn how from this free series How to Contribute to an Open Source Project on GitHub

<p align="right">(<a href="#top">back to top</a>)</p> <!-- LICENSE -->

11. <a name='License'></a>License

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

<p align="right">(<a href="#top">back to top</a>)</p> <!-- CONTACT -->

12. <a name='Contact'></a>Contact

Thomas HΓΆhenleitner - <!-- [@twitter_handle](https://twitter.com/twitter_handle) - --> th@seerose.net Project Link: https://github.com/rokath/tcobs

<!-- ACKNOWLEDGMENTS -->

13. <a name='Acknowledgments'></a>Acknowledgments

14. <a name='MaybeInterestingToo'></a>Maybe Interesting Too

<!-- * [Choose an Open Source License](https://choosealicense.com) * [GitHub Emoji Cheat Sheet](https://www.webpagefx.com/tools/emoji-cheat-sheet) * [Malven's Flexbox Cheatsheet](https://flexbox.malven.co/) * [Malven's Grid Cheatsheet](https://grid.malven.co/) * [Img Shields](https://shields.io) * [GitHub Pages](https://pages.github.com) * [Font Awesome](https://fontawesome.com) * [React Icons](https://react-icons.github.io/react-icons/search) --> <p align="right">(<a href="#top">back to top</a>)</p> <!-- MARKDOWN LINKS & IMAGES --> <!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -- > [contributors-shield]: https://img.shields.io/github/contributors/othneildrew/Best-README-Template.svg?style=for-the-badge [contributors-url]: https://github.com/othneildrew/Best-README-Template/graphs/contributors [forks-shield]: https://img.shields.io/github/forks/othneildrew/Best-README-Template.svg?style=for-the-badge [forks-url]: https://github.com/othneildrew/Best-README-Template/network/members [stars-shield]: https://img.shields.io/github/stars/othneildrew/Best-README-Template.svg?style=for-the-badge [stars-url]: https://github.com/othneildrew/Best-README-Template/stargazers [issues-shield]: https://img.shields.io/github/issues/othneildrew/Best-README-Template.svg?style=for-the-badge [issues-url]: https://github.com/othneildrew/Best-README-Template/issues [license-shield]: https://img.shields.io/github/license/othneildrew/Best-README-Template.svg?style=for-the-badge [license-url]: https://github.com/othneildrew/Best-README-Template/blob/master/LICENSE.txt [linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555 [linkedin-url]: https://linkedin.com/in/othneildrew [product-screenshot]: images/screenshot.png --> <!-- PROJECT LOGO --> <br /> <div align="center"> <a href="https://github.com/rokath/tcobs"> <img src="./docs/ref/COBSDataDisruption.svg" alt="Logo" width="800" height="80"> </a> <h3 align="center">TCOBS</h3> <p align="center"> Common Object Byte Stuffing with optimized Run-Length Encoding <br /> <a href="https://github.com/rokath/tcobs/blob/master/docs"><strong>Explore docs Β»</strong></a> <br /> <br /> <a href="https://github.com/rokath/tcobs/tree/master/v1">v1 Code</a> Β· <a href="https://github.com/rokath/tcobs/tree/master/Cv1">Cv1 Code</a> Β· <a href="https://github.com/rokath/tcobs/tree/master/Cv2">Cv2 Code</a> Β· <a href="https://github.com/rokath/tcobs/issues">Report Bug / Request Feature</a> </p> </div>

<a href="https://www.buymeacoffee.com/rokath" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="30" width="120"></a>

OR

<p> <a href="https://www.paypal.me/rolfkarlthomas"> <img src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" alt="paypal" height="40" width="120"> </a> </p>

OR

Become a Sponsor with your Github Account