Skip to content

Commit

Permalink
chore(deps): bump deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Sequal32 committed Dec 27, 2022
1 parent 95e23c7 commit 0fb85e2
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/yourcontrols-net/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ retain_mut = "0.1"
rmp-serde = "1.1"
serde = { version = "1.0", features = ["derive"] }
spin_sleep = "1.0"
zstd = "0.7"
zstd = "0.12"
socket2 = "0.4"

yourcontrols-types = { path = "../yourcontrols-types" }
Binary file removed src/yourcontrols-net/src/compress_dict.bin
Binary file not shown.
19 changes: 9 additions & 10 deletions src/yourcontrols-net/src/messages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ use rmp_serde::{self};
use serde::{Deserialize, Serialize};
use std::{net::SocketAddr, time::Instant};
use yourcontrols_types::AllNeedSync;
use zstd::block::{Compressor, Decompressor};
use zstd::bulk::{Compressor, Decompressor};

use yourcontrols_types::Error;

const COMPRESS_DICTIONARY: &[u8] = include_bytes!("compress_dict.bin");

#[derive(Serialize, Deserialize, Clone, Debug)]
pub enum Payloads {
InvalidName,
Expand Down Expand Up @@ -134,8 +132,8 @@ pub struct SenderReceiver {
socket: Socket,
sender: Sender<Packet>,
receiver: Receiver<SocketEvent>,
compressor: Compressor,
decompressor: Decompressor,
compressor: Compressor<'static>,
decompressor: Decompressor<'static>,
}

impl SenderReceiver {
Expand All @@ -147,8 +145,8 @@ impl SenderReceiver {
socket,
sender,
receiver,
compressor: Compressor::with_dict(COMPRESS_DICTIONARY.to_vec()),
decompressor: Decompressor::with_dict(COMPRESS_DICTIONARY.to_vec()),
compressor: Compressor::new(0).unwrap(),
decompressor: Decompressor::new().unwrap(),
}
}

Expand Down Expand Up @@ -181,9 +179,10 @@ impl SenderReceiver {
let payload_bytes = rmp_serde::to_vec(&message)?;

// Compress
let compressed = self
.compressor
.compress(&payload_bytes, get_compression_level_for_message(message))?;
self.compressor
.set_compression_level(get_compression_level_for_message(message));

let compressed = self.compressor.compress(&payload_bytes)?;

// Wrap
let wrapper = PayloadWrapper {
Expand Down
2 changes: 1 addition & 1 deletion src/yourcontrols-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ semver = "1.0"
simplelog = "0.12"
serde = { version = "1.0", features = ["derive"] }
rmp-serde = "1.1"
zstd = "0.7"
zstd = "0.12"
yourcontrols-net = { path = "../yourcontrols-net" }
yourcontrols-types = { path = "../yourcontrols-types" }
4 changes: 2 additions & 2 deletions src/yourcontrols-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
base64 = "0.13"
base64 = "0.20"
crossbeam-channel = "0.5"
igd = "0.12"
laminar = { git = "https://github.com/Sequal32/laminar.git" }
rmp-serde = "1.1"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_yaml = "0.8"
serde_yaml = "0.9"
12 changes: 6 additions & 6 deletions src/yourcontrols/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ name = "YourControls"
path = "src/main.rs"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
attohttpc = { version = "0.19", features = ["json"] }
base64 = "0.13"
attohttpc = { version = "0.24", features = ["json"] }
base64 = "0.20"
bimap = { version = "0.6", features = ["serde"] }
byteorder = "1.3"
crossbeam-channel = "0.5"
Expand All @@ -23,19 +23,19 @@ laminar = { git = "https://github.com/Sequal32/laminar.git" }
log = "0.4"
num = "0.4"
retain_mut = "0.1"
rodio = "0.15"
rodio = "0.16"
rmp-serde = "1.1"
semver = "1.0"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_yaml = "0.8"
serde_yaml = "0.9"
simconnect = { git = "https://github.com/Sequal32/simconnect-rust", branch = "test" }
simplelog = "0.12"
spin_sleep = "1.1"
tungstenite = "0.17"
tungstenite = "0.18"
util = "0.1"
web-view = "0.7"
zip = "0.5"
zip = "0.6"

yourcontrols-net = { path = "../yourcontrols-net" }
yourcontrols-types = { path = "../yourcontrols-types" }
Expand Down

0 comments on commit 0fb85e2

Please sign in to comment.