private static int readInt(FileChannel channel) throws IOException {
    ByteBuffer buf = ByteBuffer.allocate(4);
    int read = channel.read(buf);
    if (read != 4) {
      throw new IOException("Tried to read 4 bytes but only got " + read);
    }
    return buf.flip().getInt();
  }
Creates a new OSM input file reader.

@param path      Path to the file
@param lazyReads If {@code true}, defers reading the actual content of each block from disk until the block is
                 decoded in a worker thread.
planetiler-core/src/main/java/com/onthegomap/planetiler/reader/osm/OsmInputFile.java