Lines Matching refs:flush

32 #       x2 = co.flush()
149 # verify failure on calling decompressobj.flush with bad params
150 self.assertRaises(ValueError, zlib.decompressobj().flush, 0)
151 self.assertRaises(ValueError, zlib.decompressobj().flush, -1)
160 zlib.decompressobj().flush(sys.maxsize + 1)
276 x2 = co.flush()
277 self.assertRaises(zlib.error, co.flush) # second flush should not work
282 y2 = dco.flush()
304 x = co.compress(HAMLET_SCENE) + co.flush()
305 y = do.decompress(x, max_length=len(HAMLET_SCENE)) + do.flush()
317 x2 = co.flush()
320 y2 = dco.flush()
330 bufs.append(co.flush())
335 y2 = dco.flush()
338 def test_decompinc(self, flush=False, source=None, cx=256, dcx=64):
346 bufs.append(co.flush())
363 if flush:
364 bufs.append(dco.flush())
380 self.test_decompinc(flush=True)
391 bufs.append(co.flush())
406 bufs.append(dco.flush())
409 def test_decompressmaxlen(self, flush=False):
416 bufs.append(co.flush())
431 if flush:
432 bufs.append(dco.flush())
442 self.test_decompressmaxlen(flush=True)
475 # Test flush() with the various options, using all the
494 b = obj.flush( sync )
496 d = obj.flush()
498 print("Error for flush mode={}, level={}"
502 data, ("Decompress failed: flush "
532 # compress, sync-flush, and decompress
534 second = co.flush(zlib.Z_SYNC_FLUSH)
541 # Test that calling .flush() on unused objects works.
542 # (Bug #1083110 -- calling .flush() on decompress objects
546 self.assertTrue(co.flush()) # Returns a zlib header
548 self.assertEqual(dco.flush(), b"") # Returns nothing
558 cd = co.compress(h) + co.flush()
561 self.assertEqual(dco.decompress(cd) + dco.flush(), h)
572 d0 = co.compress(piece) + co.flush(zlib.Z_SYNC_FLUSH)
573 d1 = co.compress(piece[100:]) + co.flush(zlib.Z_SYNC_FLUSH)
574 d2 = co.compress(piece[:-100]) + co.flush(zlib.Z_SYNC_FLUSH)
589 y += dco.flush()
600 dco.flush()
609 dco.flush()
632 data += dco.flush()
642 comp = co.compress(zdict) + co.flush()
644 uncomp = dco.decompress(comp) + dco.flush()
649 # in flush(), even if this object has been freed in the meanwhile.
657 self.assertEqual(dco.flush(), input1[1:])
661 # Test flush(length) parameter greater than internal limit UINT_MAX
666 self.assertEqual(dco.flush(size), input[1:])
673 self.assertEqual(dco.flush(CustomInt()), input[1:])
689 bufs0.append(c0.flush())
693 bufs1.append(c1.flush())
704 c.flush()
740 d.flush()
760 compress = lambda s: c.compress(s) + c.flush()
766 decompress = lambda s: d.decompress(s) + d.flush()
776 comp = co.compress(data) + co.flush()
777 uncomp = do.decompress(comp) + do.flush()
790 uncomp = do.decompress(comp) + do.flush()
803 uncomp = do.decompress(comp, 1) + do.flush()
823 zlib15 = co.compress(HAMLET_SCENE) + co.flush()
837 zlib9 = co.compress(HAMLET_SCENE) + co.flush()
847 deflate15 = co.compress(HAMLET_SCENE) + co.flush()
853 deflate9 = co.compress(HAMLET_SCENE) + co.flush()
860 gzip = co.compress(HAMLET_SCENE) + co.flush()