in src/main/scala/com/gu/octopusthrift/util/ThriftSerializer.scala [11:16]
def serializeToBytes(struct: ThriftStruct): Array[Byte] = {
val buffer = new TMemoryBuffer(16384)
val protocol = new TCompactProtocol(buffer)
struct.write(protocol)
buffer.getArray
}