Package dpkt :: Module gzip :: Class Gzip
[hide private]
[frames] | no frames]

Class Gzip

source code

 object --+    
          |    
dpkt.Packet --+
              |
             Gzip

Nested Classes [hide private]

Inherited from dpkt.Packet: __metaclass__

Instance Methods [hide private]
 
unpack(self, buf)
Unpack packet header fields from buf, and set self.data.
source code
 
pack_hdr(self)
Return packed header string.
source code
 
compress(self)
Compress self.data.
source code
 
decompress(self)
Return decompressed payload.
source code

Inherited from dpkt.Packet: __getitem__, __init__, __len__, __repr__, __str__, pack

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]
  __hdr__ = (('magic', '2s', '\x1f\x8b'), ('method', 'B', 8), ('...
  __hdr_defaults__ = {'comment': '', 'extra': '', 'filename': ''...
  __hdr_fields__ = ['magic', 'method', 'flags', 'mtime', 'xflags...
  __hdr_fmt__ = '>2sBBIBB0s0s0s'
  __hdr_len__ = 10
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

unpack(self, buf)

source code 
Unpack packet header fields from buf, and set self.data.

Overrides: dpkt.Packet.unpack
(inherited documentation)

pack_hdr(self)

source code 
Return packed header string.

Overrides: dpkt.Packet.pack_hdr
(inherited documentation)

Class Variable Details [hide private]

__hdr__

Value:
(('magic', '2s', '\x1f\x8b'),
 ('method', 'B', 8),
 ('flags', 'B', 0),
 ('mtime', 'I', 0),
 ('xflags', 'B', 0),
 ('os', 'B', 3),
 ('extra', '0s', ''),
 ('filename', '0s', ''),
...

__hdr_defaults__

Value:
{'comment': '',
 'extra': '',
 'filename': '',
 'flags': 0,
 'magic': '\x1f\x8b',
 'method': 8,
 'mtime': 0,
 'os': 3,
...

__hdr_fields__

Value:
['magic',
 'method',
 'flags',
 'mtime',
 'xflags',
 'os',
 'extra',
 'filename',
...