ClickhouseLZ4OutputStream only implements write method with signature void write(int b)
but caller invokes write(byte[] buffer,int offset,int len) method
default implementation of this method is defined in parent class OutputStream calling write(int b)
hence will copy byte by byte to the currentBlock buffer
override write method and use System.arraycopy should improve peformance