The value contained in the thrift style string must be encoded in UTF8, otherwise any client will not be able to read it (for example, the Java client client).
The Thrift list<byte> will be converted to std::vector<int8_t> in C ++, but in other languages ββit will not be very good (for example, in java it will be compiled into a suboptimal list<byte> .
The binary type is the best choice in terms of interacting with clients in other languages ββand the correct definition of the protocol.
Since all 3 definitions produce messages of about the same size, I would go with binary : even if you do not need compatibility with other languages ββnow, you may need this in the future.
Wildfire
source share