code: public static int decodeSlof(
        byte[] data,
        int dataSize,
        double[] result
    ) {
      int x;
      int ri = 0;
  
      if (dataSize < 8) {
        return -1;
      }
      double fixedPoint = decodeFixedPoint(data);
  
      if (dataSize % 2 != 0) {
        return -1;
      }
  
      for (int i = 8; i < dataSize; i += 2) {
        x = (0xff & data[i]) | ((0xff & data[i + 1]) << 8);
        result[ri++] = Math.exp(((double) (0xffff & x)) / fixedPoint) - 1;
      }
      return ri;
    }
docs: Decodes data encoded by encodeSlof
  <p>
  The result vector will be exactly (|data| - 8) / 2 doubles. returns the number of doubles read,
  or -1 is there is a problem decoding.
  
  @param data array of bytes to be decoded (need memorycont. repr.)
  @param dataSize number of bytes from data to decode
  @param result array were resulting doubles should be stored
  @return the number of decoded doubles