docs: private static int moveToTiffEntryWithTag(
        InputStream is,
        int length,
        boolean isLittleEndian,
        int tagToFind)
        throws IOException {
      if (length < 14) {
        return 0;
      }
      // read the number of entries and go through all of them
      // each IFD entry has length of 12 bytes and is composed of
      // {TAG [2], TYPE [2], COUNT [4], VALUE/OFFSET [4]}
      int numEntries = StreamProcessor.readPackedInt(is, 2, isLittleEndian);
      length -= 2;
      while (numEntries-- > 0 && length >= 12) {
        int tag = StreamProcessor.readPackedInt(is, 2, isLittleEndian);
        length -= 2;
        if (tag == tagToFind) {
          return length;
        }
        is.skip(10);
        length -= 10;
      }
      return 0;
    }