protected int offsetToId(long offset) {
    // recordId=0 is used as NULL_ID (i.e. invalid) id, hence '+1' for the 1st record to have {id:1}
    long longId = (offset - recordsStartOffset()) / OFFSET_BUCKET + 1;
    int id = (int)longId;

    assert longId == id : "offset " + offset + " is out of Integer bounds";
    assert id > 0 : "id " + id + " is not a valid id";

    return id;
  }
protected int offsetToId(long offset)