Skip to content

Commit 7bb678f

Browse files
committed
Revert "try more bytes"
This reverts commit 7c56888.
1 parent 7c56888 commit 7bb678f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pymongo/compression_support.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class SnappyContext(object):
109109

110110
@staticmethod
111111
def compress(data):
112-
return bytes(snappy.compress(data))
112+
return snappy.compress(data)
113113

114114

115115
class ZlibContext(object):
@@ -138,7 +138,7 @@ def decompress(data, compressor_id):
138138
# https://github.com/andrix/python-snappy/issues/65
139139
# This only matters when data is a memoryview since
140140
# id(bytes(data)) == id(data) when data is a bytes.
141-
return bytes(snappy.uncompress(bytes(data)))
141+
return snappy.uncompress(bytes(data))
142142
elif compressor_id == ZlibContext.compressor_id:
143143
return zlib.decompress(data)
144144
elif compressor_id == ZstdContext.compressor_id:

0 commit comments

Comments
 (0)