Tiny & Lightweight Clojure ZLib helper
APACHE-2.0 License
= zlib-tiny
A Clojure library designed to cover basic needs of packing|unpacking exchange messages, storable chunks etc. And to check their consistency.
image:https://img.shields.io/github/license/source-c/zlib-tiny[GitHub] image:https://img.shields.io/clojars/v/net.tbt-post/zlib-tiny.svg[] image:https://img.shields.io/clojars/dt/net.tbt-post/zlib-tiny[ClojarsDownloads] image:https://img.shields.io/github/v/release/source-c/zlib-tiny[GitHub release (latest by date)] image:https://img.shields.io/github/release-date/source-c/zlib-tiny[GitHub Release Date] image:https://img.shields.io/github/v/tag/source-c/zlib-tiny[GitHub tag (latest by date)] image:https://img.shields.io/github/last-commit/source-c/zlib-tiny[GitHub last commit]
== Usage
Add the following to your http://github.com/technomancy/leiningen[Leiningen's] project.clj
:
CAUTION: From version v0.3.2 and upward the library may require Java class versions 53.0 and newer (J11+), thus if in your needs is to use it with some of Java 1.8, and the library build is not compatible with your version of Java, please switch back to older (0.2.x) version of the library (if your project not requires fresh features) or try to rebuild the library locally. We are doing our best to keep the library backward compatible with older Java versions, but unfortunately can not guaranty complete compatibility with wide range of java builds.
=== Compress
==== ZLib
;; ZLib Example
(bytes->str (force-byte-array (inflate (deflate (str->bytes "test it!")))))
==== GZip
;; GZip Example
(bytes->str (gunzip (gzip (str->bytes "test it!"))))
=== Checksums
==== CRC
==== Alternatives
==== Digests
$ echo -n 'test it!' | md5 f4214812f0247f69661fd29e0fca6496
$ echo -n 'test it!' | shasum -a 1 1393ce5dfcf39109a420eb583ecfdeacc28c783a -
$ echo -n 'test it!' | shasum -a 256 9c507d01834b2749d088122a7b3d200957f9b25579b5ce6b490e3b2067ee4f66 -
$ echo -n 'test it!' | shasum -a 384 6e5cc5271b2255f2cf4154c3170c5fb09059c79d28d182ac2caa59bd607ea87c09637d8f2f7b400ac80810f13027716a -
== Test
$ lein test
...
lein test zlib-tiny.checksum Test input string: 123456789 Test input bytes: 313233343536373839 CRC32 checks: "Elapsed time: 0.034417 msecs" CRC32C checks: "Elapsed time: 0.037292 msecs" Adler32 checks: "Elapsed time: 0.316375 msecs" CRC64 checks: "Elapsed time: 0.210833 msecs"
lein test zlib-tiny.compress
== Manual Build
== License
Copyright © 2017-2023
Distributed under the http://www.apache.org/licenses/LICENSE-2.0[Apache License v 2.0]