Skip to content

feat(zgfx): ZGFX (RDP8) compression support for server-side encoding #1067

@glamberson

Description

@glamberson

Summary

Implementation of ZGFX compression for server-side EGFX encoding is ready for submission. This adds the encoding counterpart to the existing decompressor in ironrdp-graphics.

What's Implemented

  • LZ77-variant compressor with O(1) hash table lookup
  • Huffman token encoding per MS-RDPEGFX specification
  • Segment wrapper for single and multipart framing
  • Round-trip compatible with existing Decompressor
  • 46 tests covering compression, wrapping, and edge cases

Context

This addresses work noted as incomplete in PR #648 (elmarco's WIP GFX) and supports the server-side EGFX implementation in PR #1057. The compression enables efficient bandwidth usage for EGFX PDU transmission.

Submission Options

I have this ready to submit and wanted to coordinate on preferred approach:

  1. Single PR - compressor.rs + wrapper.rs together
  2. Split PRs - wrapper.rs first (simpler), compressor.rs second

Layer Considerations

Current implementation places compression alongside the existing decompressor in ironrdp-graphics. An alternative would be a dedicated compression crate, but this deviates from current structure.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions