COBS
Table of Contents
About The project
1.This is a COBS implementation in Go and C with tests.
- The C code is copied from Wikipedia and adapted. Some other implementations did not pass all tests.
- The Go code was written from scratch after reviewing other implementations.
COBS Specification
2.Getting Started
3.-
Run
go vet ./...
to check build environment. -
Run
go test ./...
to perform tests. Can take a few seconds. -
Add cobs.c to your embedded project and use function
COBSEncode
to convert a buffer into COBS format. Or use functionCOBSDecode
for the other direction. -
After transmitting one (or more) COBS package(s) transmit a 0-delimiter byte.
-
Encoding is currently not implemented in Go, but its is no big deal to write an encoder in Go or an other language of your choice using the documentation.
-
Anyway you can encode inside Go using function CEncode, which is a Go wrapper for the C COBSEncode function .
-
Contributions are appreciated.
Prerequisites
3.1.- Just a C compiler and, for testing, a Go installation.
Installation
3.2.- To use COBS with Go execute
go get github.com/rokath/cobs
Roadmap
3.3.- Add Changelog
- Add back to top links
- Add Go Reader & Writer interface
- Add Additional Templates w/ Examples
See the open issues for a full list of proposed features (and known issues).
Contributing
4.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
License
5.Distributed under the MIT License. See LICENSE.txt for more information.
Contact
6.Thomas Höhenleitner - [email protected] Project Link: https://github.com/rokath/cobs