On Fri, 09 Feb 2018 17:52:33 -0800, Dan Stromberg wrote:
> Perhaps:
>
> import lzma
> lzc = lzma.LZMACompressor()
Ah, thanks for the suggestion!
--
Steve
--
https://mail.python.org/mailman/listinfo/python-list
Perhaps:
import lzma
lzc = lzma.LZMACompressor()
out1 = lzc.compress(b"Some data\n")
out2 = lzc.compress(b"Another piece of data\n")
out3 = lzc.compress(b"Even more data\n")
out4 = lzc.flush()
# Concatenate all the partial results:
result = b"".join([out1, out2, out3, out4])
?
lzma compresses ha
I want to compress a sequence of bytes one byte at a time. (I am already
processing the bytes one byte at a time, for other reasons.) I don't
particularly care *which* compression method is used, and in fact I'm not
even interested in the compressed data itself, only its length. So I'm
looking
Adam DePrince wrote:
> On Sat, 2006-03-25 at 03:08 +0200, Eyal Lotem wrote:
>> Hey.
>>
>> I have a problem in some network code. I want to send my packets
>> compressed, but I don't want to compress each packet separately (via
>> .encode('zlib') or such) but rather I'd like to compress it with re
On Sat, 2006-03-25 at 03:08 +0200, Eyal Lotem wrote:
> Hey.
>
> I have a problem in some network code. I want to send my packets compressed,
> but I don't want to compress each packet separately (via .encode('zlib') or
> such) but rather I'd like to compress it with regard to the history of the
>
Hey.
I have a problem in some network code. I want to send my packets compressed,
but I don't want to compress each packet separately (via .encode('zlib') or
such) but rather I'd like to compress it with regard to the history of the
compression stream. If I use zlib.compressobj and flush it to ge