Python binding: add streaming compression / decompression support. #39

Closed
opened 2026-01-29 20:29:36 +00:00 by claunia · 3 comments
Owner

Originally created by @rpasta42 on GitHub (Oct 1, 2015).

I'm trying to implement streaming compression using brotli. There's very little documentation and I haven't found anyone else trying to accomplish same thing. I assume I need to specify lgwin to set the block size, but when I run this code it gives me an error "brotli.error: BrotliDecompress failed"

my_str = 'very long string blah blah blah'
a = brotli.compress(my_str, lgwin=16)
b = brotli.decompress(a[0:16])

Am I doing something wrong or did I misunderstand the purpose of the lgwin parameter?

Originally created by @rpasta42 on GitHub (Oct 1, 2015). I'm trying to implement streaming compression using brotli. There's very little documentation and I haven't found anyone else trying to accomplish same thing. I assume I need to specify lgwin to set the block size, but when I run this code it gives me an error "brotli.error: BrotliDecompress failed" my_str = 'very long string blah blah blah' a = brotli.compress(my_str, lgwin=16) b = brotli.decompress(a[0:16]) Am I doing something wrong or did I misunderstand the purpose of the lgwin parameter?
Author
Owner

@eustas commented on GitHub (Oct 6, 2015):

Currently python brotli module doesn't support streaming compression/decompression.
lgwin is a parameter that is used to specify the length of LZ77 sliding window size.

Of course, streaming support will be eventually added to the Python bindings,... So stay tuned.

@eustas commented on GitHub (Oct 6, 2015): Currently python brotli module doesn't support streaming compression/decompression. lgwin is a parameter that is used to specify the length of LZ77 sliding window size. Of course, streaming support will be eventually added to the Python bindings,... So stay tuned.
Author
Owner

@Kijewski commented on GitHub (Mar 23, 2016):

Of course, streaming support will be eventually added to the Python bindings,... So stay tuned.

Do you have a more precise ETA by now? More precise than "eventually" I mean.

@Kijewski commented on GitHub (Mar 23, 2016): > Of course, streaming support will be eventually added to the Python bindings,... So stay tuned. Do you have a more precise ETA by now? More precise than "eventually" I mean.
Author
Owner

@rpasta42 commented on GitHub (Apr 5, 2016):

I know C++ and Python, but have no familiarity with brotli codebase.

Where would I begin if I wanted to implement the Python binding for this?

@rpasta42 commented on GitHub (Apr 5, 2016): I know C++ and Python, but have no familiarity with brotli codebase. Where would I begin if I wanted to implement the Python binding for this?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/brotli#39