Re:Don’t Slurp: How to Read Files in Python
by repsilat on Friday September 27, 2013 @08:55PM
(#6460434)
Even with binary files, the only reasonable ways I can think to process them are stream-wise and with mmap. (In fact, why would you ever slurp a file when you can mmap it instead?)
for one, variance in the line lengths (by byte count) will probably force the usage of inefficient buffer sizes
also, the parent comment gave one universal example: binary files