Read files in chunks
Calling `f.read()` would read the entire file at once which is wasteful. It's also not intended given the read loop. Also replace a use of `readline()` with `read(65536)` as well where we want to read the entire file and not only single lines.
Showing
想要评论请 注册 或 登录