public int approximateSizeInBytes() {
        return flushedSizeInBytes() + unflushedBytes;
    }
Get an estimate of the current size of the appended data. This estimate
is precise if no compression is in use.

@return estimated size in bytes of the appended records
raft/src/main/java/org/apache/kafka/raft/internals/BatchBuilder.java