I'm considering building an application in nodejs which would need to stream large (>GB) files containing an array of integers. Crucially the array needs to be serialised optimally, so not ascii based, ideally using 8 bits for smaller integers (which would be the vast majority of the data) but still being able to represent larger numbers.
This question is maybe about more than nodejs, but how does one go about this in nodejs? Are there readily available solutions for streaming files with custom byte encodings from disk? Or better, integer arrays?
Ideally it should be possible for the decoding of each part of the stream to be disk bound rather than cpu bound, even with an ssd.