public static GrowableByteBuffer encode(Tensor tensor, GrowableByteBuffer buffer) {
        BinaryFormat encoder = getFormatEncoder(buffer, tensor);
        encoder.encode(buffer, tensor);
        return buffer;
    }
Class used by clients for serializing a Tensor object into binary format or
de-serializing binary data into a Tensor object.

The actual binary format used is not a concern for the client and
is hidden in this class and in the binary data.

@author geirst
vespajlib/src/main/java/com/yahoo/tensor/serialization/TypedBinaryFormat.java