gzip.GzipFile.peek()

peek(n)

Read n uncompressed bytes without advancing the file position. At most one single read on the compressed stream is done to satisfy the call. The number of bytes returned may be more or less than requested.

Note

While calling peek() does not change the file position of the GzipFile, it may change the position of the underlying file object (e.g. if the GzipFile was constructed with the fileobj parameter).

New in version 3.2.

doc_python
2016-10-07 17:33:39
Comments
Leave a Comment

Please login to continue.