We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7c56888 commit 7bb678fCopy full SHA for 7bb678f
pymongo/compression_support.py
@@ -109,7 +109,7 @@ class SnappyContext(object):
109
110
@staticmethod
111
def compress(data):
112
- return bytes(snappy.compress(data))
+ return snappy.compress(data)
113
114
115
class ZlibContext(object):
@@ -138,7 +138,7 @@ def decompress(data, compressor_id):
138
# https://github.com/andrix/python-snappy/issues/65
139
# This only matters when data is a memoryview since
140
# id(bytes(data)) == id(data) when data is a bytes.
141
- return bytes(snappy.uncompress(bytes(data)))
+ return snappy.uncompress(bytes(data))
142
elif compressor_id == ZlibContext.compressor_id:
143
return zlib.decompress(data)
144
elif compressor_id == ZstdContext.compressor_id:
0 commit comments