title: Binary serialization in pure C/C++
body: <p>I'd like to implement the binary serialization on my own, without using <code>Boost</code> or any other third-party library.</p>
  
  <p>In C++ the simpliest way to achieve it is to use <code>ofstream</code> and then send a binary file over network. But is there any other stream class which I can use as a temporary buffer to avoid writing file to disk?</p>
  
  <p>Also, how can I achieve that in pure C?</p>