NuID / bytes

Cross-platform byte (de)serialization and conversion

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nuid.bytes

Cross-platform byte (de)serialization and conversion.

Requirements

jvm, node + npm, clj, shadow-cljs

Clojure and ClojureScript

tools.deps:

{nuid/bytes {:git/url "https://github.com/nuid/bytes" :sha "..."}}

usage:

$ clj # or shadow-cljs node-repl
=> (require '[nuid.bytes :as bytes])
=> (def b (bytes/from "๐Ÿด"))                   ;; defaults to utf8
=> (bytes/str b)                               ;; => "๐Ÿด"
=> (bytes/str b :charset/utf16le)              ;; => "้ฟฐ๋’"
=> (def b2 (bytes/from "๐Ÿด" :charset/utf16le))
=> (bytes/str b2 :charset/utf16le)             ;; => "๐Ÿด"

Licensing

Apache v2.0 or MIT

About

Cross-platform byte (de)serialization and conversion

License:Apache License 2.0


Languages

Language:Clojure 100.0%