[Python-checkins] CVS: python/dist/src/Lib gzip.py

Andrew M. Kuchling akuchlin@cnri.reston.va.us
Thu, 25 Mar 1999 16:49:16 -0500 (EST)


Update of /projects/cvsroot/python/dist/src/Lib
In directory amarok:/home/akuchlin/src/Python-1.5/Lib

Modified Files:
	gzip.py 
Log Message:
Based on a suggestion from bruce@hams.com, make a trivial change to
allow using the 'a' flag as a mode for opening a GzipFile.  gzip
files, surprisingly enough, can be concatenated and then decompressed;
the effect is to concatenate the two chunks of data.

If we support it on writing, it should also be supported on reading.
This *wasn't* trivial, and required rearranging the code in the
reading path, particularly the _read() method.

Raise IOError instead of RuntimeError in two cases, 'Not a gzipped file'
and 'Unknown compression method'