private void closeEncoder(boolean releaseEncodedBuf) {
        if (encoderClosed) {
            return;
        }
        encoderClosed = true;
        if (encodingStream == null) {
            return;
        }
        try {
            encodingStream.close();
            if (encodedStream != null && releaseEncodedBuf) {
                encodedStream.buffer().release();
            }
        } catch (IOException e) {
            logger.warn("Unexpected exception is raised while closing the encoding stream.", e);
        }
    }
A {@link FilteredStreamMessage} that applies HTTP encoding to {@link HttpObject}s as they are published.
core/src/main/java/com/linecorp/armeria/server/encoding/HttpEncodedResponse.java