#What is the max_size argument in std.io.Reader.readAllAlloc?
1 messages · Page 1 of 1 (latest)
If you don't know the length you should use a buffered reader.
you chose the maximum length that you are ok with reading. if you really don't want any limit you can use maxInt
buffered reader doesn't change anything about limiting how much data you want to write; it just collates reads together so you don't make a syscall for every byte
you can try to get the file size with
var fsz = (try file.stat()).size;