Skip to content
/ cobs Public
generated from rokath/Best-README-Template

COBS implementation in Go (Decoder) and C (Encoder & Decoder) with tests.

License

Notifications You must be signed in to change notification settings

rokath/cobs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

COBS

Table of Contents

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

1. About The project

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.

See TCOBS as an other possibility.

(back to top)

2. COBS Specification

(back to top)

3. Folder Information

Folder Content
src C sources ready to be used in any C project
go Go source
cgo Go project for testing

4. Getting Started

  • Clone the project with git clone [email protected]:rokath/cobs.git for example.

  • Run go vet ./... to check build environment.

  • Run go test ./... to perform tests. Can take a minute.

  • Add src to your embedded project and use function COBSEncode to convert a buffer into COBS format. Or use function COBSDecode 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.

4.1. Prerequisites

  • Just a C compiler and, for testing or, if using, a Go installation.

4.2. Installation

  • To use COBS with Go execute go get github.com/rokath/cobs
  • In your Go file: include( cobs github.com/rokath/cobs/go ), when using the Go code (decoding only).
  • In your Go file: include( cobs github.com/rokath/cobs/c ), when using the CGO code (encoding and decoding).

4.3. Roadmap

  • 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).

(back to top)

5. 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

(back to top)

6. License

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

(back to top)

7. Contact

Thomas Höhenleitner - [email protected] Project Link: https://github.com/rokath/cobs

7.1. Acknowledgments

(back to top)

Logo

COBS

Common Object Byte Stuffing
Explore the docs »

View Code · Report Bug · Request Feature

About

COBS implementation in Go (Decoder) and C (Encoder & Decoder) with tests.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published