Fixed the decompress helper
This commit is contained in:
parent
8f7d980a6a
commit
e654c00ad0
@ -104,7 +104,7 @@ bool CompressionHandler::decompress(protocol::BasicPacket* packet, std::string &
|
|||||||
auto buffer = buffer::allocate_buffer(expected_length + header_length);
|
auto buffer = buffer::allocate_buffer(expected_length + header_length);
|
||||||
|
|
||||||
size_t compressed_size{expected_length};
|
size_t compressed_size{expected_length};
|
||||||
if(!compression::qlz_compress_payload(packet->data().data_ptr(), packet->data().length(), &buffer[header_length], &compressed_size)) return false;
|
if(!compression::qlz_decompress_payload(packet->data().data_ptr(), &buffer[header_length], &compressed_size)) return false;
|
||||||
|
|
||||||
packet->buffer(buffer.range(0, compressed_size + header_length));
|
packet->buffer(buffer.range(0, compressed_size + header_length));
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user