title: C equivalent to python pickle (object serialization)?
body: <p>What would be the C equivalent to this python code? 
  Thanks. </p>
  
  <pre><code>data = gather_me_some_data()
  # where data = [ (metic, datapoints), ... ]
  # and datapoints = [ (timestamp, value), ... ]
  
  serialized_data = cPickle.dumps(data, protocol=-1)
  length_prefix = struct.pack("!L", len(serialized_data))
  message = length_prefix + serialized_data
  </code></pre>