Module gzip
source code
Functions that read and write gzipped files.
The user of the file doesn't have to worry about the compression, but
random access is not allowed.
This consisted on a patched version of of standard gzip python module
based on Andrew Kuchling's minigzip.py distributed with the zlib
module
|
GzipFile
The GzipFile class simulates most of the methods of a file object
with the exception of the readinto() and truncate() methods.
|
|
U32(i)
Return i as an unsigned integer, assuming it fits in 32 bits. |
source code
|
|
|
LOWU32(i)
Return the low-order 32 bits of an int, as a non-negative int. |
source code
|
|
|
|
|
|
|
|
|
|
|
open(filename,
mode=' rb ' ,
compresslevel=9)
Shorthand for GzipFile(filename, mode, compresslevel). |
source code
|
|
|
|
|
FCOMMENT = 16
|
|
FEXTRA = 4
|
|
FHCRC = 2
|
|
FNAME = 8
|
|
FTEXT = 1
|
|
READ = 1
|
|
WRITE = 2
|
|
__package__ = ' obitools '
|
Imports:
struct,
sys,
time,
zlib,
__builtin__
Return i as an unsigned integer, assuming it fits in 32 bits.
If it's >= 2GB when viewed as a 32-bit unsigned int, return a
long.
|
Shorthand for GzipFile(filename, mode, compresslevel).
The filename argument is required; mode defaults to 'rb' and
compresslevel defaults to 9.
|