{"id":15010473,"url":"https://github.com/source-c/zlib-tiny","last_synced_at":"2025-04-09T18:34:32.170Z","repository":{"id":62433811,"uuid":"90057639","full_name":"source-c/zlib-tiny","owner":"source-c","description":"Tiny \u0026 Lightweight Clojure ZLib helper","archived":false,"fork":false,"pushed_at":"2024-09-30T20:40:39.000Z","size":40,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-06T05:16:31.383Z","etag":null,"topics":["clj","clojure-library","crc32","crc64","dkdhub","gzip","hexlify","md5","sha1","sha256","sha512","tbt-cloud","tiny-tools","zlib"],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/source-c.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-02T17:04:17.000Z","updated_at":"2023-03-05T13:19:43.000Z","dependencies_parsed_at":"2024-10-12T10:21:07.635Z","dependency_job_id":null,"html_url":"https://github.com/source-c/zlib-tiny","commit_stats":{"total_commits":52,"total_committers":3,"mean_commits":"17.333333333333332","dds":"0.21153846153846156","last_synced_commit":"c8862826be34563f507d426400c76e833dddc418"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/source-c%2Fzlib-tiny","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/source-c%2Fzlib-tiny/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/source-c%2Fzlib-tiny/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/source-c%2Fzlib-tiny/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/source-c","download_url":"https://codeload.github.com/source-c/zlib-tiny/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248088263,"owners_count":21045671,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clj","clojure-library","crc32","crc64","dkdhub","gzip","hexlify","md5","sha1","sha256","sha512","tbt-cloud","tiny-tools","zlib"],"created_at":"2024-09-24T19:34:23.791Z","updated_at":"2025-04-09T18:34:32.138Z","avatar_url":"https://github.com/source-c.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"= zlib-tiny\n\nA Clojure library designed to cover basic needs of packing|unpacking exchange messages, storable chunks etc.\nAnd to check their consistency.\n\nimage:https://img.shields.io/github/license/source-c/zlib-tiny[GitHub]\nimage:https://img.shields.io/clojars/v/net.tbt-post/zlib-tiny.svg[]\nimage:https://img.shields.io/clojars/dt/net.tbt-post/zlib-tiny[ClojarsDownloads]\nimage:https://img.shields.io/github/v/release/source-c/zlib-tiny[GitHub release (latest by date)]\nimage:https://img.shields.io/github/release-date/source-c/zlib-tiny[GitHub Release Date]\nimage:https://img.shields.io/github/v/tag/source-c/zlib-tiny[GitHub tag (latest by date)]\nimage:https://img.shields.io/github/last-commit/source-c/zlib-tiny[GitHub last commit]\n\n== Usage\n\nAdd the following to your http://github.com/technomancy/leiningen[Leiningen's] `project.clj`:\n\n[source,clojure]\n----\n[net.tbt-post/zlib-tiny \"0.5.0\"]\n----\n\nCAUTION: 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.\n\n=== Compress\n\n==== ZLib\n\n[source,clojure]\n----\n;; ZLib Example\n\n(bytes-\u003estr\n (force-byte-array\n  (inflate\n   (deflate\n    (str-\u003ebytes \"test it!\")))))\n\n(-\u003e \"test it!\"\n    str-\u003ebytes\n    deflate\n    inflate\n    force-byte-array\n    bytes-\u003estr)\n----\n\n==== GZip\n\n[source,clojure]\n----\n;; GZip Example\n\n(bytes-\u003estr\n (gunzip\n  (gzip\n   (str-\u003ebytes \"test it!\"))))\n\n(-\u003e \"test it!\"\n    str-\u003ebytes\n    gzip\n    gunzip\n    bytes-\u003estr)\n----\n\n=== Checksums\n\n==== CRC\n\n[source,clojure]\n----\n;; CRC32 example\n(crc32 (.getBytes \"123456789\"))\n=\u003e 3421780262\n----\n\n[source,clojure]\n----\n;; CRC32C example\n(crc32c (.getBytes \"123456789\"))\n=\u003e 3808858755\n----\n\n[source,clojure]\n----\n;; CRC64 example\n(crc64 (.getBytes \"123456789\"))\n=\u003e -7395533204333446662\n----\n\n==== Alternatives\n\n[source,clojure]\n----\n;; Adler32 example\n(adler32 (.getBytes \"123456789\"))\n=\u003e 152961502\n----\n\n==== Digests\n\n[source,shell]\n----\n$ echo -n 'test it!' | md5\nf4214812f0247f69661fd29e0fca6496\n\n$ echo -n 'test it!' | shasum -a 1\n1393ce5dfcf39109a420eb583ecfdeacc28c783a  -\n\n$ echo -n 'test it!' | shasum -a 256\n9c507d01834b2749d088122a7b3d200957f9b25579b5ce6b490e3b2067ee4f66  -\n\n$ echo -n 'test it!' | shasum -a 384\n6e5cc5271b2255f2cf4154c3170c5fb09059c79d28d182ac2caa59bd607ea87c09637d8f2f7b400ac80810f13027716a  -\n\n$ echo -n 'test it!' | shasum -a 512\n15353093ef47d2eadefc55d7bc641b6f1150e0b28a609d2368394748091f20b9125e98fe0603b2fbe57f9d65a9b286a8d0dbf70e8f597525051b6f9220e9b61f  -\n----\n\n[source,clojure]\n----\n(-\u003e \"test it!\" str-\u003ebytes md5 hexlify)\n=\u003e \"f4214812f0247f69661fd29e0fca6496\"\n(-\u003e \"test it!\" str-\u003ebytes sha-1 hexlify)\n=\u003e \"1393ce5dfcf39109a420eb583ecfdeacc28c783a\"\n(-\u003e \"test it!\" str-\u003ebytes sha-256 hexlify)\n=\u003e \"9c507d01834b2749d088122a7b3d200957f9b25579b5ce6b490e3b2067ee4f66\"\n(-\u003e \"test it!\" str-\u003ebytes sha-384 hexlify)\n=\u003e \"6e5cc5271b2255f2cf4154c3170c5fb09059c79d28d182ac2caa59bd607ea87c09637d8f2f7b400ac80810f13027716a\"\n(-\u003e \"test it!\" str-\u003ebytes sha-512 hexlify)\n=\u003e \"15353093ef47d2eadefc55d7bc641b6f1150e0b28a609d2368394748091f20b9125e98fe0603b2fbe57f9d65a9b286a8d0dbf70e8f597525051b6f9220e9b61f\"\n----\n\n== Test\n\n[source,text]\n----\n$ lein test\n\n...\n\nlein test zlib-tiny.checksum\nTest input string: 123456789\nTest input bytes: 313233343536373839\nCRC32 checks:\n\"Elapsed time: 0.034417 msecs\"\nCRC32C checks:\n\"Elapsed time: 0.037292 msecs\"\nAdler32 checks:\n\"Elapsed time: 0.316375 msecs\"\nCRC64 checks:\n\"Elapsed time: 0.210833 msecs\"\n\nlein test zlib-tiny.compress\n\nRan 3 tests containing 13 assertions.\n----\n\n== Manual Build\n\n[source,text]\n----\n$ lein install\n----\n\n== License\n\nCopyright © 2017-2023\n\nDistributed under the http://www.apache.org/licenses/LICENSE-2.0[Apache License v 2.0]\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsource-c%2Fzlib-tiny","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsource-c%2Fzlib-tiny","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsource-c%2Fzlib-tiny/lists"}