Skip to main content

Module compression

Module compression 

Source
Expand description

Optional heatshrink payload compression.

Behind the heatshrink feature flag. Wraps the embedded-heatshrink crate’s stream-style API into byte-slice helpers that match the chunk sizes our file-transfer code works in.

The host compresses each chunk before passing it to FileTransfer::write; the device decompresses on the fly using the same parameters. Window and lookahead must match what the device advertised during QUERY.

Enums§

HeatshrinkErrorheatshrink
Errors returned by the heatshrink wrappers.

Functions§

compressheatshrink
Compress input using heatshrink with the given window/lookahead parameters. The parameters MUST match what the device advertised during QUERY.
decompressheatshrink
Decompress input. The device decompresses during real transfers; this is here for the sake of round-trip tests.