mirror of
https://github.com/NimCompression/nimsnappyc
synced 2026-01-02 09:04:45 +00:00
No description
| nimsnappyc | ||
| tests | ||
| .appveyor.yml | ||
| .gitignore | ||
| .travis.yml | ||
| LICENSE | ||
| nimsnappyc.nim | ||
| nimsnappyc.nimble | ||
| README.md | ||
NimSnappyC
NimSnappyC provides a Snappy compression/decompression for Nim through wrapping to snappy-c.
Installation
Add this to your application's .nimble file:
requires "nimsnappyc"
or to install globally run:
nimble install nimsnappyc
Usage
import nimsnappyc
# Compress a string:
let data = "0123456789abcdef"
let compressed = snappyCompress(data)
# Get the uncompressed length of compressed data:
let uncompressedLen = snappyUncompressedLength(compressed)
# Uncompress a compressed data:
let uncompressed = snappyUncompress(compressed)
Raises the SnappyError exception on errors.
Contributing
- Fork it (https://github.com/NimCompression/nimsnappyc/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
License
MIT
Authors: NimCompression
Snappy-C License
BSD 3-Clause License
Author: Andi Kleen