• Home
  • Raw
  • Download

Lines Matching refs:dco

248             dco = zlib.decompressobj()
249 y1 = dco.decompress(v1 + v2)
250 y2 = dco.flush()
252 self.assertIsInstance(dco.unconsumed_tail, bytes)
253 self.assertIsInstance(dco.unused_data, bytes)
286 dco = zlib.decompressobj(wbits)
287 y1 = dco.decompress(x1 + x2)
288 y2 = dco.flush()
301 dco = zlib.decompressobj()
302 y1 = dco.decompress(b''.join(bufs))
303 y2 = dco.flush()
323 dco = zlib.decompressobj()
326 bufs.append(dco.decompress(combuf[i:i+dcx]))
327 self.assertEqual(b'', dco.unconsumed_tail, ########
329 len(dco.unconsumed_tail))
330 self.assertEqual(b'', dco.unused_data)
332 bufs.append(dco.flush())
335 chunk = dco.decompress(b'')
340 self.assertEqual(b'', dco.unconsumed_tail, ########
342 len(dco.unconsumed_tail))
343 self.assertEqual(b'', dco.unused_data)
364 dco = zlib.decompressobj()
369 chunk = dco.decompress(cb, dcx)
373 cb = dco.unconsumed_tail
374 bufs.append(dco.flush())
389 dco = zlib.decompressobj()
394 chunk = dco.decompress(cb, max_length)
398 cb = dco.unconsumed_tail
400 bufs.append(dco.flush())
403 chunk = dco.decompress(b'', max_length)
414 dco = zlib.decompressobj()
415 self.assertRaises(ValueError, dco.decompress, b"", -1)
416 self.assertEqual(b'', dco.unconsumed_tail)
424 dco = zlib.decompressobj()
425 self.assertEqual(dco.decompress(compressed, sys.maxsize), data)
430 dco = zlib.decompressobj()
431 self.assertEqual(dco.decompress(compressed, CustomInt()), data[:100])
437 dco = zlib.decompressobj()
438 ddata = dco.decompress(cdata, 1)
439 ddata += dco.decompress(dco.unconsumed_tail)
440 self.assertEqual(dco.unconsumed_tail, b"")
483 dco = zlib.decompressobj()
503 expanded = dco.decompress(first + second)
515 dco = zlib.decompressobj()
516 self.assertEqual(dco.flush(), b"") # Returns nothing
528 dco = zlib.decompressobj(zdict=zdict)
529 self.assertEqual(dco.decompress(cd) + dco.flush(), h)
531 dco = zlib.decompressobj()
532 self.assertRaises(zlib.error, dco.decompress, cd)
555 dco = zlib.decompressobj()
556 y = dco.decompress(x[:-5])
557 y += dco.flush()
562 dco = zlib.decompressobj()
563 self.assertFalse(dco.eof)
564 dco.decompress(x[:-5])
565 self.assertFalse(dco.eof)
566 dco.decompress(x[-5:])
567 self.assertTrue(dco.eof)
568 dco.flush()
569 self.assertTrue(dco.eof)
573 dco = zlib.decompressobj()
574 self.assertFalse(dco.eof)
575 dco.decompress(x[:-5])
576 self.assertFalse(dco.eof)
577 dco.flush()
578 self.assertFalse(dco.eof)
589 dco = zlib.decompressobj()
593 self.assertEqual(dco.unused_data, b'')
595 data += dco.decompress(x[i : i + step])
596 self.assertEqual(dco.unconsumed_tail, b'')
598 data += dco.decompress(
599 dco.unconsumed_tail + x[i : i + step], maxlen)
600 data += dco.flush()
601 self.assertTrue(dco.eof)
603 self.assertEqual(dco.unconsumed_tail, b'')
604 self.assertEqual(dco.unused_data, remainder)
611 dco = zlib.decompressobj(wbits=-zlib.MAX_WBITS, zdict=zdict)
612 uncomp = dco.decompress(comp) + dco.flush()
621 dco = zlib.decompressobj()
622 dco.decompress(data, 1)
625 self.assertEqual(dco.flush(), input1[1:])
632 dco = zlib.decompressobj()
633 dco.decompress(data, 1)
634 self.assertEqual(dco.flush(size), input[1:])
639 dco = zlib.decompressobj()
640 dco.decompress(data, 1)
641 self.assertEqual(dco.flush(CustomInt()), input[1:])
798 dco = zlib.decompressobj(wbits=32 + 15)
799 self.assertEqual(dco.decompress(zlib15), HAMLET_SCENE)
800 dco = zlib.decompressobj(wbits=14)
802 dco.decompress(zlib15)
811 dco = zlib.decompressobj(wbits=32 + 9)
812 self.assertEqual(dco.decompress(zlib9), HAMLET_SCENE)
817 dco = zlib.decompressobj(wbits=-15)
818 self.assertEqual(dco.decompress(deflate15), HAMLET_SCENE)
824 dco = zlib.decompressobj(wbits=-9)
825 self.assertEqual(dco.decompress(deflate9), HAMLET_SCENE)
831 dco = zlib.decompressobj(32 + 15)
832 self.assertEqual(dco.decompress(gzip), HAMLET_SCENE)