System info
msgpackr version: 1.11.0
node version: v22.9.0
- OS:
Windows 11 x64
Reduced test case
import { encode, decode } from 'msgpackr'
export function test() {
let obj: any = {}
for (let i = 0; i < 70000; i++) {
obj['x' + i] = true
}
const encoded = encode(obj)
const decoded = decode(encoded)
console.log(decoded)
}
test()
decode(encoded) fails with error:
Error: Data read, but end of buffer not reached
{"x0":true,"x1":true,"x2":true,"x3":true,"x4":true,"x5":true,"x6":true,"x7":true,"x8":true,"x9":true
If reducing loop to 60,000 iterations (object keys), there is no failure on decoding, meaning the issue is likely related to the size of the object.