public ClickHouseByteBuffer compact() {
        if (position > 0 || length < array.length) {
            byte[] bytes = new byte[length];
            System.arraycopy(array, position, bytes, 0, length);
            this.array = bytes;
            this.position = 0;
        }

        return this;
    }
Compacts byte array by creating a new copy with exact same {@code length} but
{@code position} changed to zero. It does nothing when {@code position} is
zero and {@code length} is same as {@code bytes.length}.

@return this byte buffer
clickhouse-data/src/main/java/com/clickhouse/data/ClickHouseByteBuffer.java