title: Apache Thrift : difference between byte and binary types
body: <p>I would like to send 1024 bytes of data using Thrift. It must be exactly 1024 bytes because it is a comparative benchmark with other frameworks.</p>
  
  <p>Thrift has two types to represent bytes : 'byte' and 'binary', but I don't know how to use these types.
  'binary' type is mapped to std::string which is quite strange  (I don't understand why and how to use it).
  'byte' type is mapped to a 8 bits integer which seems more logical to me.</p>
  
  <p>To represent 1024 bytes of data, I use : <code>list&lt;byte&gt; byteSequence</code> with a size of 1024.</p>
  
  <p>But a compile warning advises me to use <code>binary</code> instead of <code>list&lt;byte&gt;</code>, but why ? and how ? </p>
  
  <p>I think I will get much better performance with 'binary' because it is strangely slow with a 1024 sequence of bytes.</p>
  
  <p>Thank you.</p>