cmcqueen / cobs-c Goto Github PK
View Code? Open in Web Editor NEWConsistent Overhead Byte Stuffing — C implementation
License: MIT License
Consistent Overhead Byte Stuffing — C implementation
License: MIT License
Originally reported by: Craig McQueen (Bitbucket: cmcqueen1975, GitHub: Unknown)
Provide example source code that demonstrates basic usage of the encode and decode functions.
C unit tests would also demonstrate usage, however a separate example would be more accessible.
Originally reported by: Craig McQueen (Bitbucket: cmcqueen1975, GitHub: Unknown)
Add wiki documentation of the COBS encoding and decoding functions.
Whoops, disregard this, it's late, I missed something in the paper.
Originally reported by: Craig McQueen (Bitbucket: cmcqueen1975, GitHub: @cmcqueen)
Examine whether the code supports in-place encoding and/or decoding. That is, output is written to the input buffer, overwriting the original input. It could be useful to save RAM in small embedded systems.
COBS_ENCODE_SRC_OFFSET()
and COBSR_ENCODE_SRC_OFFSET()
which calculate the required offset, for a given data size.Once this has been checked:
Originally reported by: Yaroslav Boris (Bitbucket: Boris_Yaroslav, GitHub: Unknown)
How about to realize the version without using buffers?
This will be useful for the controllers, who do not have a lot of memory.
For example: I received byte - passed to the function, the function may call another function, which sends the decoded byte.
There seems to be an error in the encoder or decoder for C implementation of the COBSR algorithm.
I modified the test code in tests-c/main.c
to check whether the decoded data resulted in the same as the original data. Sometimes it seems the decoded result is one byte longer. In the other cases the last byte is one higher than the original last byte.
Take the example data: 00 00
, which when encoded and decoded results in 00 00 02
. And 31 32 33 34 35
results in 31 32 33 34 36
Originally reported by: Craig McQueen (Bitbucket: cmcqueen1975, GitHub: Unknown)
There are unit tests, but written in Python. This is good, but doesn't allow for unit tests to be run on a platform that doesn't support Python--e.g. a small embedded platform.
It would be good to provide some unit tests in C with reasonably good coverage.
For all the COBS and COBS/R encode and decode functions, change input and output buffer pointers to be void *
instead of uint8_t *
.
This would be similar to functions such as memcpy()
which deal with void *
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.