title: TCL save bigint to binary
body: <p>I'm using arbitrary precision integers in TCL 8.6.</p>
  
  <p>For example:</p>
  
  <pre><code>set x [expr {10**1000}]
  </code></pre>
  
  <p>How can I save this number to binary? The <code>binary format</code> command doesn't seem to work for this.</p>
  
  <p>I also need to be able to read the number back in later.</p>
  
  <p>I know I can use a loop doing <code>x &amp; 0XFFFF</code> and <code>x &gt;&gt; 16</code> to dump each word one at a time, but I thought maybe there an efficient was a way to dump the memory directly.</p>
  
  <p>Any ideas?</p>