public static byte[] encode(Tensor tensor) {
        GrowableByteBuffer buffer = new GrowableByteBuffer();
        return asByteArray(encode(tensor, 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