I'm trying to figure how to use mmap with a gzip compressed file. Is that even possible ?
import mmap import os import gzip filename = r'C:\temp\data.gz' file = gzip.open(filename, "rb+") size = os.path.getsize(filename) file = mmap.mmap(file.fileno(), size) print file.read(8)
The output data is compressed.