I have basic beginning to a parser for the BSON spec: <a href="http://www.mongodb.org/display/DOCS/BSON">http://www.mongodb.org/display/DOCS/BSON</a><br>It is basically a binary compressed form of JSON. <br>The usage model should be general, but I intend to read this data over TCP. <br>
<br>Currently my system is quite inefficient, I convert leading bytes to Int then switch based on that type that that Int represtents.<br><br>I was wondering if there is a tool set that exists for this purpose. For instance, should I use Data.Binary and make my Binary instance of get and put use the BSON protocol? Or is that not correct? <br>
I also looked at Parsec.ByteString, but that seems to only have a file input mechanism, and tcp buffers may be out of its scope. Are there any other tools that I should look at?<br><br>I&#39;m sure similar things have been done before. Can anyone point me to some open, successful implementations that I could mimick? <br clear="all">
<br><br>-- <br>We can&#39;t solve problems by using the same kind of thinking we used when we created them. <br>    - A. Einstein<br>