add gz compression

This commit is contained in:
Vinzenz Schroeter 2024-05-11 21:14:20 +02:00
parent 0e393896d3
commit 5c61d02749
8 changed files with 243 additions and 108 deletions

View file

@ -17,9 +17,9 @@ impl Connection {
}
/// Send a command to the display
pub fn send(&self, packet: impl Into<Packet> + Debug) -> std::io::Result<()> {
pub fn send(&self, packet: impl Into<Packet> + Debug) -> Result<(), std::io::Error> {
debug!("sending {packet:?}");
let packet = packet.into();
let packet: Packet = packet.into();
let data: Vec<u8> = packet.into();
self.socket.send(&*data)?;
Ok(())