docs: @Override
      boolean offer(DBBPool.BBContainer cont) throws IOException
      {
          if (m_closed) {
              throw new IOException("Segment closed");
          }
          final ByteBuffer buf = cont.b();
          final int remaining = buf.remaining();
          boolean compress = m_compress && remaining >= 32 && buf.isDirect();
  
          final int maxCompressedSize = (compress ? CompressionService.maxCompressedLength(remaining) : remaining) + ENTRY_HEADER_BYTES;
          if (remaining() < maxCompressedSize) {
              return false;
          }
  
          m_syncedSinceLastEdit = false;
          DBBPool.BBContainer destBuf = cont;
          try {
              m_entryHeaderBuf.b().clear();
  
              if (compress) {
                  destBuf = DBBPool.allocateDirectAndPool(maxCompressedSize);
                  final int compressedSize = CompressionService.compressBuffer(buf, destBuf.b());
                  destBuf.b().limit(compressedSize);
                  writeEntryHeader(destBuf.b(), PBDSegment.FLAG_COMPRESSED);
              } else {
                  destBuf = cont;
                  writeEntryHeader(destBuf.b(), PBDSegment.NO_FLAGS);
              }
              // Write entry header
              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(remaining);
          } finally {
              destBuf.discard();
              if (compress) {
                  cont.discard();
              }
          }
  
          return true;
      }