The second data structure is an array of structure .. the third set of structure are a series of &quot;bit&quot; lists ... Each array element&nbsp; has an offset for its&nbsp; corresponding &quot;bit list&quot;:<br><br>[{........, offset: Int64}] [[bit]]<br>
<br>when I marshall up all this &quot;offset&quot; should be the serialized/&quot;marshalled&quot; 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">&lt;<a href="mailto:aslatter@gmail.com">aslatter@gmail.com</a>&gt;</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 &lt;<a href="mailto:vigalchin@gmail.com">vigalchin@gmail.com</a>&gt;:<br>

<div><div></div><div class="Wj3C7c">&gt;<br>
&gt; &nbsp; &nbsp; Say I have several data structures that are marshalled(using Binary<br>
&gt; class) and written out linearly on persistence store. I want to calculate<br>
&gt; the offsets in bytes of these various data structures in a functional<br>
&gt; language way. What is the &quot;suggested&quot; (elegant) way .... ?<br>
&gt;<br>
<br>
</div></div>It doesn&#39;t look like the &#39;Put&#39; monad in te binary package keeps track<br>
of position in the output stream.<br>
<br>
Is there a bigger-picture goal you&#39;re trying to achieve? &nbsp;Maybe we<br>
could suggest a better approach by stepping back a bit.<br>
<font color="#888888"><br>
-Antoine<br>
</font></blockquote></div><br>