public void write(ByteBuffer input) throws IOException {
        Deflater localDeflater = deflater;
        localDeflater.setInput(input);
        ByteBuffer localTempOut = tempOut;
        while (input.hasRemaining()) {
            int written = localDeflater.deflate(localTempOut, Deflater.NO_FLUSH);
            if (written > 0) {
                localTempOut.flip();
                channel.write(localTempOut);
                localTempOut.clear();
            }
        }
        input.clear();
        crc.update(input);
    }
This class has a better performance than {@link GZIPOutputStream} because the class: 1. uses
(direct) ByteBuffer instead of byte[] 2. caches and reuse data 3. no synchronized on our own
methods

@author James Chen
@see java.util.zip.DeflaterOutputStream
@see java.util.zip.GZIPOutputStream
turms-server-common/src/main/java/im/turms/server/common/infra/logging/core/compression/FastGzipOutputStream.java