@Override
        public void write(int b) throws IOException {
          if (same) {
            if (pageSize == offsetInPage && offsetInFile < fileLength) {    // reached end of current byte buffer
              offsetInFile += offsetInPage;
              currentPage.close();
              currentPage = storage.pageByOffset(offsetInFile, /*forWrite: */ false);
              offsetInPage = 0;
            }
            same = offsetInPage < fileLength && currentPage.get(offsetInPage) == (byte)b;
            offsetInPage++;
          }
        }
@Override
        public void write(int b)