/Shox96_Arduino_lib

Compressing and decompressing Strings for Arduino

Primary LanguageC++Apache License 2.0Apache-2.0

Compression and Decompression for Arduino

Shox96 is a technique for compressing short strings. This library provides for Arduino the same API as the desktop version at Shox96 - Guaranteed compression for Short Strings.

To find out how Shox96 works, read this article.

Usage

The following API can be used for compressing and decompressing strings or files:

long shox96_0_2_0_compress(const char *in, long len, char *out, struct lnk_lst *ll);
long shox96_0_2_0_decompress(const char *in, long len, char *out, struct lnk_lst *ll);

The last parameter can be NULL. See example provided for demonstration of usage or see the documentation at https://github.com/siara-cc/Shox96 for further details.

For using Shox96 to store compressed data in Progmem of Arduino Uno and up, see the library at https://github.com/siara-cc/Shox96_Arduino_Progmem_lib.

Screenshots

The example provided with this library allows you to enter a string and see how much compression can be achieved. In general, compression utilities such as zip, gzip do not compress short strings well and often expand them. They also use lots of memory which makes them unusable in constrained environments like Arduino.

Related projects