encode csv to protobuf