The second data structure is an array of structure .. the third set of structure are a series of "bit" lists ... Each array element has an offset for its corresponding "bit list":<br><br>[{........, offset: Int64}] [[bit]]<br>
<br>when I marshall up all this "offset" should be the serialized/"marshalled" offset of its correponding [bit]!!<br><br>Regards, Vasili<br><br><br><div class="gmail_quote">On Thu, Jan 1, 2009 at 10:51 PM, Antoine Latter <span dir="ltr"><<a href="mailto:aslatter@gmail.com">aslatter@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">2009/1/1 Galchin, Vasili <<a href="mailto:vigalchin@gmail.com">vigalchin@gmail.com</a>>:<br>
<div><div></div><div class="Wj3C7c">><br>
> Say I have several data structures that are marshalled(using Binary<br>
> class) and written out linearly on persistence store. I want to calculate<br>
> the offsets in bytes of these various data structures in a functional<br>
> language way. What is the "suggested" (elegant) way .... ?<br>
><br>
<br>
</div></div>It doesn't look like the 'Put' monad in te binary package keeps track<br>
of position in the output stream.<br>
<br>
Is there a bigger-picture goal you're trying to achieve? Maybe we<br>
could suggest a better approach by stepping back a bit.<br>
<font color="#888888"><br>
-Antoine<br>
</font></blockquote></div><br>