Commit 012e76b7 authored by Nicolas Wavrant's avatar Nicolas Wavrant

read chunks of 1Mb

parent d7d4aa73
......@@ -23,7 +23,7 @@ os.environ['LC_ALL'] = 'C'
os.umask(0o77)
def read_file_by_chunk(path, chunk_size=1024 * 10):
def read_file_by_chunk(path, chunk_size=1024 * 1024):
with open(path, 'rb') as f:
chunk = f.read(chunk_size)
while chunk:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment