<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <!-- This module was also published with a richer model, Gradle metadata,  -->
  <!-- which should be used instead. Do not delete the following line which  -->
  <!-- is to indicate to Gradle or any Gradle module metadata file consumer  -->
  <!-- that they should prefer consuming it instead. -->
  <!-- do_not_remove: published-with-gradle-metadata -->
  <modelVersion>4.0.0</modelVersion>
  <groupId>io.github.markrileybot</groupId>
  <artifactId>heatshrink-java</artifactId>
  <version>1.0.1</version>
  <name>heatshrink-java</name>
  <description># heatshrink-java

Java library used to encode/decode [heatshrink](https://github.com/atomicobject/heatshrink) compressed data.

## Building

```bash
./gradlew build
```

## Gradle dependency

See https://search.maven.org/artifact/io.github.markrileybot/heatshrink-java/

## Usage

### Java library

```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));
}

```

### CLI

```bash

$ java -jar heatshrink-java-exe.jar [-h] [-e|-d] [-v] [-w SIZE] [-l BITS] [IN_FILE] [OUT_FILE]

```

## Status
[![Build Status](https://github.com/markrileybot/heatshrink-java/actions/workflows/gradle-publish.yml/badge.svg)](https://github.com/markrileybot/heatshrink-java/actions/workflows/gradle-publish.yml)
[![Coverage Status](https://coveralls.io/repos/github/markrileybot/heatshrink-java/badge.svg?branch=master)](https://coveralls.io/github/markrileybot/heatshrink-java?branch=master)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.github.markrileybot/geokey/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.github.markrileybot/geokey)

</description>
  <url>https://github.com/markrileybot/heatshrink-java</url>
  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0</url>
    </license>
  </licenses>
  <developers>
    <developer>
      <name>Mark Riley</name>
      <email>mark@markriley.net</email>
      <url>https://github.com/markrileybot/heatshrink-java</url>
    </developer>
  </developers>
  <scm>
    <connection>git:git@github.com:markrileybot/heatshrink-java</connection>
    <developerConnection>git:git@github.com:markrileybot/heatshrink-java</developerConnection>
    <url>https://github.com/markrileybot/heatshrink-java</url>
  </scm>
</project>
