Summary
When all the keys and values are strings of length smaller than 4, the encoded data cannot be decoded successfully with the following error.
Uncaught Error: Data read, but end of buffer not reached
at checkedRead (./node_modules/cbor-x/dist/node.cjs:229:10)
at Encoder.decode (./node_modules/cbor-x/dist/node.cjs:156:12)
How to reproduce
const { Encoder } = require('cbor-x');
const encoder = new Encoder({ bundleStrings: true });
const data = { abc: '<=3' };
const buf = encoder.encode(data);
encoder.decode(buf); // <-- this will produce the above error
Environment
Node.js: 22.12.0
cbor-x: 1.6.0