Pure and light binary records
Clojure
Latest commit 67cace8 May 20, 2014 Thomas Kristensen Add dosctrings.
Permalink
Failed to load latest commit information.
src/baldr Add dosctrings. May 20, 2014
test/baldr Make appropiate functions private. May 20, 2014
.gitignore initial commit May 7, 2014
LICENSE initial commit May 7, 2014
README.md README typos and cruft. May 7, 2014
project.clj release 0.1.1 May 7, 2014

README.md

Baldr

baldr

Named after the "god of light and purity" in Norse mythology. A light and pure file format for records of bytes.

Usage

Add the library to your project dependencies.

[baldr "0.1.1"]

Write byte-arrays to an OutputStream using baldr-writer.

(let [ostream (ByteArrayOutputStream. 100)
      write (baldr.core/baldr-writer ostream)]
  (write (byte-array [1 2 3]))
  (write (byte-array [1 2 3 4]))
  (.close ostream))

Read seq of byte-arrays from an InputStream using baldr-seq.

(let [ostream (ByteArrayOutputStream. 100)
      write (baldr.core/baldr-writer ostream)]
  (write (byte-array [1 2 3]))
  (write (byte-array [1 2 3 4]))
  (.close ostream)
  (baldr.core/baldr-seq (ByteArrayInputStream. (.toByteArray ostream))))

License

Copyright © uSwitch

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.