Table of Contents
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.
go vet ./...to check build environment.
go test ./...to perform tests. Can take a few seconds.
Add cobs.c to your embedded project and use function
COBSEncodeto convert a buffer into COBS format. Or use function
COBSDecodefor 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.
- Just a C compiler and, for testing, a Go installation.
- To use COBS with Go execute
go get github.com/rokath/cobs
- 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).
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
Distributed under the MIT License. See LICENSE.txt for more information.