binary structures/bitstrings

2010-04-17 Thread Scott T
Does anyone know of a clojure library for handling (un)packing of binary structures? I'm looking for something similar to perl/ruby/ python's pack(...) function or something like OCaml's bitstring module. My initial google and clojure-contrib perusing hasn't turned up anything obvious though I've

Re: binary structures/bitstrings

2010-04-18 Thread Geoff
I've implemented something similar for working with java.nio.ByteBuffer objects to pull apart and build network packets, but it's not packaged as a separate library right now. Look at http://github.com/geoffsalmon/bonjure/blob/master/src/bonjure/bytebuffer.clj specifically the pack, unpack, pack-bi

Re: binary structures/bitstrings

2010-04-18 Thread Scott T
Well, network packets would also be a good use of what I was looking for and it looks *very* much like something useful for what I want. I'll clone it and try it in the next few days. My intention is to use it for some low-level structures inside virtual disk files... I haven't done anything with

Re: binary structures/bitstrings

2010-04-19 Thread Geoff
I've pushed the bytebuffer stuff into it's own repo and project and cleaned up the documentation a bit. See http://github.com/geoffsalmon/bytebuffer I'd appreciate any feedback you have after trying it out. - Geoff -- You received this message because you are subscribed to the Google Groups "Cl

Re: binary structures/bitstrings

2010-04-19 Thread Scott T
Thanks a lot for pulling that out. I'll let you know how it goes. -Scott On Apr 19, 1:40 am, Geoff wrote: > I've pushed the bytebuffer stuff into it's own repo and project and > cleaned up the documentation a bit. > Seehttp://github.com/geoffsalmon/bytebuffer > > I'd appreciate any feedback you

Re: binary structures/bitstrings

2010-04-20 Thread Scott T
After looking through the code and tests, it looks like *exactly* what I'll need and I doubt I'll need/want to change anything. Thanks for the docs as well - it's nice to see code that looks like it was written like you "meant it" :). I'll probably use clojure to build my prototype (with all 8.5