Re: reading binary blob

2012-10-11 Thread Brian Craft
If I'm holding a binary blob from a db query result, is clojure.java.io/input-stream the right way to present it as a stream? I'm doing (:require [org.clojars.smee.binary.core :as binary]) (:require [clojure.java.io :as io]) ... (defn score-decode [blob] (binary/decode codec-length (io/

Re: reading binary blob

2012-10-09 Thread Steffen
Hi, I wrote a binary parser combinator(ish) library that uses java's input/outputstreams (https://github.com/smee/binary) that may help (add [org.clojars.smee/binary "0.2.0"] to your project's leiningen dependencies). As I use streams, I have no way of knowing the size of a binary blob beforeh

reading binary blob

2012-10-08 Thread Brian Craft
I need to parse some floats from a binary blob. The whole blob is floats, so the number of floats can be found from the blob size. Is gloss the best way to do it? Is there anything simpler? gloss doesn't seem to have a nice way to saying "read floats until you run out of bytes". I also couldn'