您好我正在尝试使用此代码解压缩Landsat 7间隙掩码
file_z='C:/bassel300\gap_mask\LE717_B8.TIF.gz'
inF = gzip.GzipFile(file_z, 'rb')
s = inF.read()
inF.close()
该代码适用于除了波段8以外的所有波段,其大小(220兆)比其他波段(55兆欧)
这是我得到的错误:
Unhandled exception while debugging...
Traceback (most recent call last):
File "C:\test22\bnd8.py", line 9, in <module>
s = inF.read()
File "C:\Python27\ArcGIS10.1\lib\gzip.py", line 245, in read
self._read(readsize)
File "C:\Python27\ArcGIS10.1\lib\gzip.py", line 304, in _read
self._add_read_data( uncompress )
File "C:\Python27\ArcGIS10.1\lib\gzip.py", line 322, in _add_read_data
self.extrabuf = self.extrabuf[offset:] + data
MemoryError
>>>