MCPcopy Create free account
hub / github.com/apache/cassandra-python-driver / compress

Method compress

cassandra/segment.py:121–124  ·  view source on GitHub ↗
(self, data)

Source from the content-addressed store, hash-verified

119 return self.compressor and self.decompressor
120
121 def compress(self, data):
122 # the uncompressed length is already encoded in the header, so
123 # we remove it here
124 return self.compressor(data)[4:]
125
126 def decompress(self, encoded_data, uncompressed_length):
127 return self.decompressor(int32_pack(uncompressed_length) + encoded_data)

Calls

no outgoing calls