Possible Duplicate:
uncompressing tar.Z file with python?
I am trying to read a zlib compressed in order to directly access the data in the contained HDF file (using pyhdf). However, I always receive an error message. Here is the file.
import zlib
file = open('3B42.20070101.00.7A.HDF.Z','rb')
data = zlib.decompress(file.read())
>> error: Error -3 while decompressing data: incorrect header check
I checked several other ways (e.g. gzip.open/gzip.zlib) but nothing seems to work. Do you have any suggestions?