def test_bigfile(): t = time.time() for i in xrange(100): z = zziplib.open("truc.zip") entry = z.open("toto.234") s = entry.read(1024) print s[:60] print (time.time() - t) * 10, " ms per open()"
def infiniteloop(): while True: z = zziplib.open("truc.zip") entry = z.open("toto.234") while True: s = entry.read(512) if not s: break entry.close() entry = z.open("toto.234") while True: s = entry.read(512) if not s: break entry.close()