Looking for a reference binary parsing

2014-01-24 Thread Kashyap CK
Hi, I need to write a parser for MP4 - essentially, read an MP4 file and create an in-memory representation of its structure. I'd appreciate it very much if I could get some suggestions on libraries that I could use for this. Is there a https://github.com/youngnh/parsatron like library that works

Re: Looking for a reference binary parsing

2014-01-24 Thread James Reeves
You might want to take a look at Gloss ( https://github.com/ztellman/gloss) and Buffy ( https://github.com/clojurewerkz/buffy ). - James On 24 January 2014 15:08, Kashyap CK wrote: > Hi, > I need to write a parser for MP4 - essentially, read an MP4 file and > create an in-memory representation

Re: Looking for a reference binary parsing

2014-01-24 Thread dgrnbrg
I have found Gloss to be a pleasure to work with, and the fact that it handles framing, arbitrary header logic, and streaming decoding made it the best choice when I was writing codecs for binary formats whose files didn't/needed to be streamed, rather than bulk-loaded. On Friday, January 24, 2

Re: Looking for a reference binary parsing

2014-01-24 Thread Kashyap CK
Thank you for the pointers. Regards, Kashyap On Saturday, January 25, 2014 5:43:09 AM UTC+5:30, dgrnbrg wrote: > > I have found Gloss to be a pleasure to work with, and the fact that it > handles framing, arbitrary header logic, and streaming decoding made it the > best choice when I was writin

Re: Looking for a reference binary parsing

2014-01-27 Thread danneu
ztellman's Gloss is magic to me. - Here's an example of my first attempt to use Gloss to parse the Bitcoin protocol: https://gist.github.com/danneu/7397350 -- In 2-chan.clj, it demonstrates using ztellman's Aleph to send Bitcoin's verack handshake to a node and ask it for blocks. - Bitcoin prot

Re: Looking for a reference binary parsing

2014-01-27 Thread Aaron Cohen
Have you already looked into using https://code.google.com/p/mp4parser/ ? On Fri, Jan 24, 2014 at 10:08 AM, Kashyap CK wrote: > Hi, > I need to write a parser for MP4 - essentially, read an MP4 file and > create an in-memory representation of its structure. > I'd appreciate it very much if I c

Re: Looking for a reference binary parsing

2014-01-27 Thread Cedric Greevey
On Mon, Jan 27, 2014 at 4:13 PM, danneu wrote: > ztellman's Gloss is magic to me. > > - Here's an example of my first attempt to use Gloss to parse the Bitcoin > protocol: https://gist.github.com/danneu/7397350 -- In 2-chan.clj, it > demonstrates using ztellman's Aleph to send Bitcoin's verack ha

Re: Looking for a reference binary parsing

2014-01-28 Thread Kashyap CK
I started exploring Parsatron - I really like the idea of building big parsers by composing small parsers. Looking at Gloss's api - it does not appear to help build bigger parsers by composing smaller ones. Did I understand it right? Regards, Kashyap On Tuesday, January 28, 2014 8:09:59 AM UTC

Re: Looking for a reference binary parsing

2014-01-28 Thread danneu
It's the network protocol. With a simple state machine, your Clojure REPL can become a simple Bitcoin node and do fun things like download the blockchain. What's it good for? At first, it's good for some Saturday morning fun. But then I started implementing blockchain validation which happens t