Example #1
0
 def _test_compression_streaming(self):
     # test compressing with one byte at a time...
     # XXX: disabled as LZMA doesn't support streaming compression yet
     compress = pylzma.compressobj(eos=1)
     infile = BytesIO(self.plain)
     outfile = BytesIO()
     while 1:
         data = infile.read(1)
         if not data: break
         outfile.write(compress.compress(data, 1))
     outfile.write(compress.flush())
     check = pylzma.decompress(outfile.getvalue())
     self.assertEqual(check, self.plain)
Example #2
0
 def _test_compression_streaming(self):
     # test compressing with one byte at a time...
     # XXX: disabled as LZMA doesn't support streaming compression yet
     compress = pylzma.compressobj(eos=1)
     infile = BytesIO(self.plain)
     outfile = BytesIO()
     while 1:
         data = infile.read(1)
         if not data: break
         outfile.write(compress.compress(data, 1))
     outfile.write(compress.flush())
     check = pylzma.decompress(outfile.getvalue())
     self.assertEqual(check, self.plain)
Example #3
0
 def _test_compression_streaming(self):
     # XXX: this doesn't work, yet
     # test compressing with one byte at a time...
     compress = pylzma.compressobj(eos=1)
     infile = StringIO(self.plain)
     outfile = StringIO()
     while 1:
         data = infile.read(1)
         if not data: break
         outfile.write(compress.compress(data, 1))
     outfile.write(compress.flush())
     check = pylzma.decompress(outfile.getvalue())
     self.assertEqual(check, self.plain)
Example #4
0
 def _test_compression_streaming(self):
     # XXX: this doesn't work, yet
     # test compressing with one byte at a time...
     compress = pylzma.compressobj(eos=1)
     infile = StringIO(self.plain)
     outfile = StringIO()
     while 1:
         data = infile.read(1)
         if not data: break
         outfile.write(compress.compress(data, 1))
     outfile.write(compress.flush())
     check = pylzma.decompress(outfile.getvalue())
     self.assertEqual(check, self.plain)