How can I read an arbitrary file and process it "piece by piece" (meaning byte by byte or some other chunk size that would give the best read performance) without loading the entire file into memory? An example of processing would be to generate an MD5 hash of the file although the answer could apply to any operation.
I'd like to have or write this but if I can get existing code that would be great too.
(c#)
System.IO.FileStream
does NOT load the file into memory." – Signification