code: public static BasicVector fromBinary(byte[] array) {
          ByteBuffer buffer = ByteBuffer.wrap(array);
  
          if (buffer.get() != VECTOR_TAG) {
              throw new IllegalArgumentException("Can not decode BasicVector from the given byte array.");
          }
  
          double[] values = new double[buffer.getInt()];
          for (int i = 0; i < values.length; i++) {
              values[i] = buffer.getDouble();
          }
  
          return new BasicVector(values);
      }
docs: Decodes {@link BasicVector} from the given byte {@code array}.
  
  @param array the byte array representing a vector
  
  @return a decoded vector