-
Notifications
You must be signed in to change notification settings - Fork 105
Closed
Description
#72 allows users to compress memoryviews via snappy.compress interface.
However, StreamCompressor.add_chunk raises TypeError when generating crc:
env36/lib/python3.6/site-packages/snappy/snappy.py:139: in add_chunk
crc = _masked_crc32c(chunk)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
data = <memory at 0x7fb4e4cad648>
def _masked_crc32c(data):
# see the framing format specification
> crc = _crc32c(data)
E TypeError: argument 1 must be read-only bytes-like object, not memoryview
Looks like snappy__crc32c should be refactored to also support the buffer protocol.
Metadata
Metadata
Assignees
Labels
No labels