Esempio n. 1
0
 def getdata(self):
     r=self._r
     append=r.append
     append(self._c.flush())
     append(pack("<i", self._crc))
     append(pack("<i", self._l))
     return ''.join(r)
Esempio n. 2
0
 def getdata(self):
     r = self._r
     append = r.append
     append(self._c.flush())
     append(pack("<i", self._crc))
     append(pack("<i", self._l))
     return ''.join(r)
Esempio n. 3
0
 def __init__(self, name, t=None):
     self._c = zlib.compressobj(9, zlib.DEFLATED, -zlib.MAX_WBITS,
                                zlib.DEF_MEM_LEVEL, 0)
     if t is None: t = time.time()
     self._r = [
         '\037\213\010\010',
         pack("<i", int(t)), '\2\377', name, '\0'
     ]
Esempio n. 4
0
 def __init__(self, name, t=None):
     self._c=zlib.compressobj(9, zlib.DEFLATED, -zlib.MAX_WBITS,
                              zlib.DEF_MEM_LEVEL, 0)
     if t is None: t=time.time()
     self._r=['\037\213\010\010',
              pack("<i", int(t)),
              '\2\377',
              name,
              '\0'
              ]