cobs.rs
cobs.rs copied to clipboard
Make overhead and encoding len functions const
It would be nice if the max_encoding_length and a new max_encoding_overhead functions could be used when declaring and initializing buffers (e.g. encoded data buffer).
I made those functions constant to allow this. I also added a separate function to only calculate the overhead and added a few basic tests.
I did not see a CHANGELOG to add those additions / improvements. What do you think about adding a CHANGELOG?
Any updates on this?
You might want to add #[inline] to the functions
I added the #[inline] attributes
Any chance this could get checked and possibly merged? I'd love to use the upstream again :)