+3 votes
in Programming Languages by (4.6k points)
I have a very large zipped file and I want to read it without unzipping. Can I use some library in Python to read a zipped file?

1 Answer

+1 vote
by (22.3k points)

I think you can use gzip library to read a zipped file in python.

Try the following code:

import gzip
with gzip.open(wv.inpfile, 'rb') as fin:
        for line in fin:
   #you record should be in line