Hey Geoff, This sort of feedback and code recommendations is exactly what I was hoping for.
Geoff <geoff.sal...@gmail.com> writes: > Hey Eric > I did something similar for handling unsigned types. I think it's > simpler and probably faster, not that I've checked. Here's a gist of > it https://gist.github.com/767887 > Ah, these do look like an improvement, thanks for sharing. > > That code is part of a little library I wrote a while ago > https://github.com/geoffsalmon/bytebuffer It's closer to your bin-ed > in complexity than to gloss. You might also find the pack-bits and > unpack-bits functions useful if you're parsing bit-fields and not > using Gloss's bits-seq. > Very nice, I'm actually using vectors to fake ordered maps to mimic Gloss' (keyword value) codecs, e.g. https://gist.github.com/768101 Cheers -- Eric > > I'm going to give Gloss a try. For complex binary structures, I think > I like it's way of specifying formats using (keyword, type) pairs and > reading and writing maps instead of bytebuffer's which specifies > formats as strings ('b' for byte, 'i' for int, and so on) and reads > and writes seqs of values. > > - Geoff > > > On Jan 5, 5:45 pm, "Eric Schulte" <schulte.e...@gmail.com> wrote: >> also, here's a patch to Gloss which I've used locally but which may be >> generally useful. >> >> Cheers -- Eric >> >> 0001-adding-primitive-support-for-uint16-uint32-and-uint6.patch >> 1KViewDownload >> >> >> >> "Eric Schulte" <schulte.e...@gmail.com> writes: >> > Thanks for sharing this library, I found reading your code to be very >> > useful. >> >> > I need to be able to read and write elf files from within Clojure code, >> > and Gloss initially looked like a good option. However much of the >> > streaming support and frame-based conception got in the way of my >> > particular needs. >> >> > In the end I have written a much simpler collection of functions which >> > supports parsing binary files into lists of bytes, manipulating these >> > lists, and then writing the lists back to binary files. This is heavily >> > influenced by the code in Gloss. Seehttps://github.com/eschulte/bin-ed >> >> > Anyways just thought I'd share, if anyone notices anything in the code >> > which doesn't make sense, or could be more easily accomplished in some >> > other way please do let me know. >> >> > Thanks -- Eric -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en