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

COBS

Table of Contents

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.

(back to top)

2. COBS Specification

(back to top)

3. Getting Started

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

3.1. Prerequisites

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

3.2. Installation

  • To use COBS with Go execute go get github.com/rokath/cobs

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

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

5. License

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

(back to top)

6. Contact

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

6.1. Acknowledgments

(back to top)

Logo

COBS

Common Object Byte Stuffing
Explore the docs »

View Code · Report Bug · Request Feature

Owner
Thomas Höhenleitner
Firmware-Architektur, Embedded Video, Multitasking, DALI, CAN, Flexray, LIN, I2C, Robustes Design, Fehlersuche, real-time, Testsysteme, Safety (FMEA), Crypto
Thomas Höhenleitner
Similar Resources

jsonpointer - an RFC 6901 implementation for Go

jsonpointer - an RFC 6901 implementation for Go Package jsonpointer provides the ability to resolve, assign, and delete values of any type, including

Jan 13, 2022

Fast JSON parser and validator for Go. No custom structs, no code generation, no reflection

fastjson - fast JSON parser and validator for Go Features Fast. As usual, up to 15x faster than the standard encoding/json. See benchmarks. Parses arb

May 11, 2022

/ˈdʏf/ - diff tool for YAML files, and sometimes JSON

/ˈdʏf/ - diff tool for YAML files, and sometimes JSON

dyff is inspired by the way the old BOSH v1 deployment output reported changes from one version to another by only showing the parts of a YAML file that change.

May 4, 2022

HuJSON: JSON for Humans (comments and trailing commas)

HuJSON - Human JSON The HuJSON decoder is a JSON decoder that also allows comments, both /* ... */ and // to end of line trailing commas on arrays and

May 7, 2022

tson is JSON viewer and editor written in Go

tson is JSON viewer and editor written in Go

tson tson is JSON viewer and editor written in Go. This tool displays JSON as a tree and you can search and edit key or values. Support OS Mac Linux I

Mar 17, 2022

A Small tool for SDWAN performance test and policy validation

sdwan-perf Sdwan-perf is based on golang and could support almost platform for performance and policy validation. SDWAN Performance Test Report +--

May 14, 2022

JSONata in Go Package jsonata is a query and transformation language for JSON

JSONata in Go Package jsonata is a query and transformation language for JSON. It's a Go port of the JavaScript library JSONata.

Apr 27, 2022

Slow and unreliable JSON parser generator (in progress)

VivaceJSON Fast and reliable JSON parser generator Todo List parse fields parse types generate struct generate (keypath+key) to struct Value Mapping F

Mar 3, 2022

Package json implements encoding and decoding of JSON as defined in RFC 7159

Package json implements encoding and decoding of JSON as defined in RFC 7159. The mapping between JSON and Go values is described in the documentation for the Marshal and Unmarshal functions

Apr 15, 2022
Related tags
Fast JSON encoder/decoder compatible with encoding/json for Go
Fast JSON encoder/decoder compatible with encoding/json for Go

Fast JSON encoder/decoder compatible with encoding/json for Go

May 14, 2022
goi - The “Quite OK Image” format encoder / decoder for Go.
goi - The “Quite OK Image” format encoder / decoder for Go.

goi - The “Quite OK Image” format encoder / decoder for Go. QOI - The “Quite OK Image” - is losslessly image format that offering speedup both compres

Mar 3, 2022
Decoder/Encoder for GhostControls Gate Remotes

ghostcontrols Decoder/Encoder for GhostControls Gate Remotes GhostControls makes a variety of automatic gate operators, transmitters and keypads & rec

Jan 1, 2022
Fast and flexible JSON encoder for Go
Fast and flexible JSON encoder for Go

Jettison Jettison is a fast and flexible JSON encoder for the Go programming language, inspired by bet365/jingo, with a richer features set, aiming at

May 13, 2022
Fork of Go's standard library json encoder

A fork of the Go standard library's json encoder Why? https://github.com/golang/go/issues/6213 was proposed in 2013 but was never accepted. Difference

Nov 25, 2021
A tool to aggregate and mine data from JSON reports of Go tests.

teststat A tool to aggregate and mine data from JSON reports of Go tests. Why? Mature Go projects often have a lot of tests, and not all of them are i

Jan 3, 2022
Golang JSON decoder supporting case-sensitive, number-preserving, and strict decoding use cases

Golang JSON decoder supporting case-sensitive, number-preserving, and strict decoding use cases

Apr 3, 2022
An efficient JSON decoder

pkg/json An alternative JSON decoder for Go. Features pkg/json aims to be a drop in replacement for encoding/json. It features: json.Scanner which, wh

Mar 4, 2022
Pure Go implementation of jq

gojq Pure Go implementation of jq This is an implementation of jq command written in Go language. You can also embed gojq as a library to your Go prod

May 7, 2022
This an implementation of Jsonnet in pure Go.

This an implementation of Jsonnet in pure Go. It is a feature complete, production-ready implementation. It is compatible with the original Jsonnet C++ implementation. Bindings to C and Python are available (but not battle-tested yet).

May 6, 2022