Encoding

Trait Encoding 

Source
pub trait Encoding {
    // Required method
    fn encode(
        &self,
        data: &[u8],
        width: u16,
        height: u16,
        quality: u8,
        compression: u8,
    ) -> BytesMut;
}
Expand description

Trait defining the interface for RFB encoding implementations.

Required Methods§

Source

fn encode( &self, data: &[u8], width: u16, height: u16, quality: u8, compression: u8, ) -> BytesMut

Encodes raw pixel data into RFB-compatible byte stream.

§Arguments
  • data - Raw pixel data (RGBA format: 4 bytes per pixel)
  • width - Width of the framebuffer
  • height - Height of the framebuffer
  • quality - Quality level for lossy encodings (0-100)
  • compression - Compression level (0-9)
§Returns

Encoded data as BytesMut

Implementors§