, split , . gzip gzip. gunzip , . , , . , Python, - :
infile_name = "file.dat.gz"
chunk = 50*1024*1024
with open(infile_name, 'rb') as infile:
for n, raw_bytes in enumerate(iter(lambda: infile.read(chunk), b'')):
print(n, chunk)
with open('{}.part-{}'.format(infile_name[:-3], n), 'wb') as outfile:
outfile.write(raw_bytes)
, .
, , . - bytesIO, gunzip gzip , , bytesIO.
, , , .