zippy

Pure Nim implementation of deflate, zlib, gzip and zip.


Keywords
compression, zlib, zip, deflate, gzip, huffman-coding, lz77, nim, tarball
License
MIT
Install
nimble install zippy

Documentation

Zippy

nimble install zippy

Zippy is an in-progress and experimental implementation of DEFLATE and ZLIB.

The goal of this library is to be a dependency-free Nim implementation that is as small and straightforward as possible while still focusing on performance.

This library is an active project and not ready for production use.

Testing

nimble test

Credits

This implementation has been greatly assisted by zlib-inflate-simple which is by far the smallest and most readable implemenation I've found.

API: zippy

import zippy

func uncompress

Uncompresses src into dst. This resizes dst as needed and starts writing at dst index 0.

func uncompress(src: seq[uint8]; dst: var seq[uint8]) {.raises: [ZippyException], tags: [].}

func uncompress

Uncompresses src and returns the uncompressed data seq.

func uncompress(src: seq[uint8]): seq[uint8] {.inline, raises: [ZippyException], tags: [].}