← ClaudeAtlas

heatshrink-integrationlisted

Use when integrating or debugging heatshrink embedded compression — encoder/decoder sink/poll/finish loops, window/lookahead sz2, HSER/HSDR codes, or static vs dynamic alloc
easyzoom/aix-skills · ★ 26 · AI & Automation · score 77
Install: claude install-skill easyzoom/aix-skills
# heatshrink Integration ## Overview Use this skill to integrate heatshrink (`github.com/atomicobject/heatshrink`) by fixing memory budget, `window_sz2`/`lookahead_sz2` sizes, the sink/poll/finish streaming loop, and decompression safety. Compression bugs usually come from mismatched encoder/decoder settings, an unfinished poll loop, or output buffers that are too small. ## When To Use Use this skill when: - The user wants heatshrink compression/decompression on an MCU. - The task involves compressed logs, resources, firmware chunks, OTA payloads, or serial transfer compression. - Decompression fails, output is truncated, memory is too high, or compressed data is incompatible. - The project uses `heatshrink_encoder.h`, `heatshrink_decoder.h`, `heatshrink_config.h`, or the `heatshrink` command-line tool. Do not use this skill for general archive formats like gzip/zip unless heatshrink is specifically involved. ## First Questions Ask for: - Use case: logs, UI assets, firmware chunks, telemetry, or storage. - Encoder/decoder settings: `window_sz2` (4-15) and `lookahead_sz2` (3 to `window_sz2 - 1`). The CLI's compiled default is `-w 11 -l 4`; its help text recommends `-w 8 -l 4` for embedded systems. - Allocation model: `HEATSHRINK_DYNAMIC_ALLOC` (heap via `HEATSHRINK_MALLOC`/`HEATSHRINK_FREE`) or static (`HEATSHRINK_STATIC_WINDOW_BITS`, `HEATSHRINK_STATIC_LOOKAHEAD_BITS`, `HEATSHRINK_STATIC_INPUT_BUFFER_SIZE`). - Streaming or one-shot mode, and input/output chunk sizes