docs: @Override
      int offer(DeferredSerialization ds) throws IOException
      {
          if (m_closed) {
              throw new IOException("closed");
          }
          final int fullSize = ds.getSerializedSize();
          if (remaining() < fullSize) {
              return -1;
          }
  
          m_syncedSinceLastEdit = false;
          DBBPool.BBContainer destBuf = DBBPool.allocateDirectAndPool(fullSize);
  
          try {
              m_entryHeaderBuf.b().clear();
              final int written = MiscUtils.writeDeferredSerialization(destBuf.b(), ds);
              destBuf.b().flip();
              // Write entry header
              writeEntryHeader(destBuf.b(), PBDSegment.NO_FLAGS);
              m_entryHeaderBuf.b().flip();
              while (m_entryHeaderBuf.b().hasRemaining()) {
                  m_fc.write(m_entryHeaderBuf.b());
              }
              // Write entry
              destBuf.b().flip();
              while (destBuf.b().hasRemaining()) {
                  m_fc.write(destBuf.b());
              }
              // Update segment header
              incrementNumEntries(written);
              return written;
          } finally {
              destBuf.discard();
          }
      }