Length conversion looks wrong
evilpie opened this issue · 0 comments
evilpie commented
This Uint32Array only has one element so the reduce isn't doing anything. I think you could replace the whole code with:
const header = new Uint32Array(1);
std.in.read(header.buffer, 0, header.byteLength);
// https://stackoverflow.com/a/26140545
const length = header[0];