Ah sorry I did not see that before.
Could you rather zip the file directly and then open directly rather than having this archive stuff?
http://docs.python.org/2/library/gzip.html