Closed om26er closed 1 year ago
Eventually we might want to migrate to a faster CBOR implementation https://github.com/kriszyp/cbor-x -- I think we essentially need to make sure that library plays nicely with large decimals as well
I think we essentially need to make sure that library plays nicely with large decimals as well
yes, agreed. this, plus checking large integers handling, unicode and bytes - or checking that the upstream project has test coverage from that.
in general, I would opt for us selecting the "best" cbor library instead of a user figuring that out. if someone wants to use one specific library (for whatever reasons), that seems like a more uncommon use case, and hence I'd argue we should focus on the former. In doing so, IMO security+compliance must always come first, and only then performance.
The underlying CBOR library has an issue when sending payload larger than 16kb. They also suggest a fix for that https://github.com/hildjj/node-cbor/tree/main/packages/cbor#highwatermark -- I have tried the
encodeAsync
function and it does solve the problem.