microlzw is a lightweight and embeddable Micro Lempel-Ziv-Welch (MLZW) compression library designed specifically for Arduino projects. It provides efficient string compression and decompression functionalities, catering to scenarios where memory and storage resources are limited.
- Memory-friendly — Designed to work within the constraints of Arduino projects, ensuring efficient use of memory resources.
- Easy Integration — Simple and straightforward API for easy integration into your Arduino projects.
- Comprehensive Documentation — The header file includes detailed comments to guide developers in using the library effectively.
API Documentation
void mlzw_compress(
char *input,
int *compressed,
size_t *comp_size,
int dict_size
);
Compresses a string using the Micro Lempel-Ziv-Welch algorithm.
Description
This function takes an input string and compresses it using the Micro Lempel-Ziv-Welch (MLZW) algorithm. The compressed output, compressed size, and dictionary size are returned through the parameters.
Parameters
- input — The input string to be compressed.
- compressed — A pointer to an array that will store the compressed data.
- comp_size — A pointer to a variable that will store the size of the compressed data.
- dict_size — The size of the dictionary to be used in the compression.
void mlzw_decompress(
int *compressed,
size_t comp_size,
char *output,
int dict_size
);
Decompresses a string that was compressed using Micro Lempel-Ziv-Welch algorithm.
Description
This function takes a compressed input, decompresses it using the Micro Lempel-Ziv-Welch (MLZW) algorithm, and stores the decompressed output in the provided output buffer.
Parameters
- compressed — A pointer to an array containing the compressed data.
- comp_size — The size of the compressed data.
- output — A pointer to an array that will store the decompressed output.
- dict_size — The size of the dictionary used in the compression.

