mirror of
https://github.com/griffi-gh/kubi.git
synced 2024-11-22 14:58:44 -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
|
//TODO multithreaded decompression
|
||||||
fn decompress_chunk_packet(data: &Box<[u8]>) -> Result<ServerToClientMessage> {
|
fn decompress_chunk_packet(data: &Box<[u8]>) -> Result<ServerToClientMessage> {
|
||||||
let data_ref = &data[1..];
|
let mut decompressed = decompress_size_prepended(&data[1..])?;
|
||||||
let decompressed = decompress_size_prepended(data_ref)?;
|
decompressed.insert(0, data[0]);
|
||||||
let deserialized = postcard::from_bytes(&decompressed).ok().context("Deserialization failed")?;
|
let deserialized = postcard::from_bytes(&decompressed).ok().context("Deserialization failed")?;
|
||||||
Ok(deserialized)
|
Ok(deserialized)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue