quininer / cbor4ii

CBOR: Concise Binary Object Representation
MIT License
54 stars 5 forks source link

core: expose a public in-memory writer #14

Closed vmx closed 2 years ago

vmx commented 2 years ago

BufWriter can be used to serialize things into memory. The API is inspired by std::io::BufWriter.

In case you wonder why the decode tests suddenly need use_std, that's been the case even before this change.

vmx commented 2 years ago

This needs more work. It doesn't even work for the case I had in mind.

vmx commented 2 years ago

I added a clear() function, now it's ready for review.