Contains a delta encoder / decoder and heatshrink compression.
heatshrink comes from https://github.com/atomicobject/heatshrink
Type make, which builds both static and dynamically-allocated compressor / decompressors.
Start with the dynamic/fit_*zip.c files.
The fit_zip executable can take two command-line arguments: -w sets the window size and -l sets the lookup size. -w 0 has a special meaning: No compression is performed, just delta encoding.
The fit_unzip executable can take one command-line flag: -d disables decompression and performs only delta decoding.
Start with static/fit_zip.c. You will need to supply FILE * file descriptors to read and write. Only fread() and fwrite() are called on these, so they can be search-and-replaced to a different type of file descriptors if necessary. (or maybe macro-ized?)
See zfit.pdf to choose appropriate parameters for your device.
| File | Description |
|---|---|
./README |
This file |
./LICENSE |
ISC License, like heatshrink itself |
./zfit.pdf |
Algorithm documentation |
./Makefile |
Makes both static and dynamic variants |
./heatshrink |
git pull of heatshrink source |
./static |
Statically-allocated variant. Encoder only. |
./dynamic |
Dynamically-allocated, encoder and decoder |
./static/heatshrink_config.h |
heatshrink configuration for static alloc |
./static/fit_zip.c |
Source for static compressor |
./static/Makefile |
Builds static compressor |
./verify.py |
Python helper for verification / testing |
./dynamic/heatshrink_config.h |
heatshrink configuration for dynamic alloc |
./dynamic/fit_zip.c |
Source for dynamic compressor |
./dynamic/fit_unzip.c |
Source for dynamic decompressor |
./dynamic/Makefile |
Builds dynamic compressor / decompressor |
./fit_delta_encode.c |
FIT delta encoder |