Java library used to encode/decode heatshrink compressed data.
./gradlew build
See https://search.maven.org/artifact/io.github.markrileybot/heatshrink-java/
int windowSize = 9;
int lookaheadSize = 8;
ByteArrayOutputStream baos = new ByteArrayOutputStream();
try(HsOutputStream out = new HsOutputStream(baos, windowSize, lookaheadSize)) {
out.write("ABCABCABCABCABCABC".getBytes());
}
try(HsInputStream hsi = new HsInputStream(new ByteArrayInutStream(baos.toByteArray()), windowSize, lookaheadSize)) {
byte[] res = new byte[512];
int len = hsi.read(res);
System.out.println(new String(res, 0, len));
}
$ java -jar heatshrink-java-exe.jar [-h] [-e|-d] [-v] [-w SIZE] [-l BITS] [IN_FILE] [OUT_FILE]