mirror of
https://github.com/griffi-gh/kubi.git
synced 2024-11-25 16:28:42 -06:00
fix client decompression
This commit is contained in:
parent
68bc848cbd
commit
739e53c0a9
|
@ -112,8 +112,8 @@ fn check_server_hello_response(
|
|||
|
||||
//TODO multithreaded decompression
|
||||
fn decompress_chunk_packet(data: &Box<[u8]>) -> Result<ServerToClientMessage> {
|
||||
let data_ref = &data[1..];
|
||||
let decompressed = decompress_size_prepended(data_ref)?;
|
||||
let mut decompressed = decompress_size_prepended(&data[1..])?;
|
||||
decompressed.insert(0, data[0]);
|
||||
let deserialized = postcard::from_bytes(&decompressed).ok().context("Deserialization failed")?;
|
||||
Ok(deserialized)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue