@Override
    public long getLong(long index) {
      long byteIndex = index << 3;
      if (byteIndex >= writeOffset) {
        throw new IndexOutOfBoundsException("index: " + index + " size: " + size());
      }
      int slabIdx = (int) (byteIndex >>> slabBits);
      int offset = (int) (byteIndex & slabMask);
      return arrays.get(slabIdx).getLong(offset);
    }
Returns the slab that the next value should be written to.
planetiler-core/src/main/java/com/onthegomap/planetiler/collection/AppendStoreRam.java