Skip to content
This repository has been archived by the owner on Mar 24, 2021. It is now read-only.

LZ4 Compression fails with lz4 version 0.10.1 #985

Open
ghop02 opened this issue Dec 12, 2019 · 0 comments
Open

LZ4 Compression fails with lz4 version 0.10.1 #985

ghop02 opened this issue Dec 12, 2019 · 0 comments

Comments

@ghop02
Copy link

ghop02 commented Dec 12, 2019

PyKafka version: 2.8.0
Kafka version: 0.11.1

In [8]: lz4.__version__
Out[8]: '0.10.1'

In [9]: compression.encode_lz4(memoryview(bytearray(b"")))
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-9-0d1d70f0048d> in <module>
----> 1 compression.encode_lz4(memoryview(bytearray(b"")))

TypeError: argument 1 must be read-only bytes-like object, not memoryview

Upgrading lz4 should fix the issue!

In [5]: lz4.__version__
Out[5]: '2.2.1'

In [6]: compression.encode_lz4(memoryview(bytearray(b"")))
Out[6]: b'\x04"M\x18`@\x82\x00\x00\x00\x00'
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant