I wasn’t able to find such function in the Stdlib. Does it exist or do I need to resort to low-level functions from the Unix module?
Stdlib.input that reads at most
n bytes from a channel?
Stdlib.really_input should do exactly what you need.
Yes, I ended up using