Improving gzip function for huge files
inF = gzip.open(FILE, 'rb')
    s = inF.read()
    inF.close()



That reads the whole uncompressed data into memory. Of course it takes 60GB of memory.

Looking at the documentation for gzip, it has this example of compressing a file:

import gzip
import shutil
with open('file.txt', 'rb') as f_in, gzip.open('file.txt.gz', 'wb') as f_out:
    shutil.copyfileobj(f_in, f_out)


If you switch that round to:

import gzip
import shutil
with open('file.txt', 'wb') as f_out, gzip.open('file.txt.gz', 'rb') as f_in:
    shutil.copyfileobj(f_in, f_out)


then I think you'll find the memory usage is much lower.