ambuf or filebuf
      class from the standard ones, one that is specific to your data
      types (or an abstraction thereof) is probably a good idea, and
      lots of examples exist in journals and on Usenet.  Using the
      standard filebufs directly (either by declaring your own or by
      using the pointer returned from an fstream's <code class="code">rdbuf()</code>)
      is certainly feasible as well.
   </p><p>One area that causes problems is trying to do bit-by-bit operations
      with filebufs