code: @Override
    @InService(TableWriterService.class)
    public Page writeCheckpoint(TableKelp table,
                                OutSegment sOut,
                                long oldSequence,
                                int saveLength,
                                int saveTail,
                                int saveSequence)
      throws IOException
    {
      BlockLeaf []blocks = _blocks;
      
      int size = BLOCK_SIZE * blocks.length;
      
      WriteStream os = sOut.out();
      
      int available = sOut.getAvailable();
      
      if (available < os.position() + size) {
        return null;
      }
      
      long newSequence = sOut.getSequence();
      
      if (newSequence < oldSequence) {
        return null;
      }
      
      compareAndSetSequence(oldSequence, newSequence);
  
      PageLeafStub stub = _stub;
      // System.out.println("WRC: " + this + " " + stub);
      Type type;
  
      if (saveLength > 0
          && oldSequence == newSequence
          && stub != null 
          && stub.allowDelta()) {
        int offset = (int) os.position();
        
        type = writeDelta(table, sOut.out(), saveLength);
        
        int length = (int) (os.position() - offset);
  
        stub.addDelta(table, offset, length);
      }
      else {
        // _lastSequence = newSequence;
        int offset = (int) os.position();
        
        if (sOut.isCompress()) {
          try (OutputStream zOut = sOut.outCompress()) {
            type = writeCheckpointFull(table, zOut, saveTail);
          }
        }
        else {
          type = writeCheckpointFull(table, sOut.out(), saveTail);
        }
        
        int length = (int) (os.position() - offset);
        
        // create stub to the newly written data, allowing this memory to be
        // garbage collected
        stub = new PageLeafStub(getId(), getNextId(), 
                                sOut.getSegment(),
                                offset, length);
        
        stub.setLeafRef(this);
        
        _stub = stub;
      }
      
      _writeType = type;
      
      return this;
    }
docs: Callback from the writer and gc to write the page.