docs: private int getMediumInt(byte b1, byte b2, byte b3) {
      int ret = b1 << 16 & 0xff0000 | b2 << 8 & 0xff00 | b3 & 0xff;
      // Check to see if the medium int is negative (high bit in b1 set)
      if ((b1 & 0x80) == 0x80) {
        // Make the the whole int negative
        ret |= 0xff000000;
      }
      return ret;
    }