code: @Override
    public CompressionOutputStream createOutputStream(OutputStream out,
                                                      Compressor compressor)
        throws IOException {
      if (!isNativeCodeLoaded()) {
        throw new RuntimeException("native lz4 library not available");
      }
      int bufferSize = conf.getInt(
          IO_COMPRESSION_CODEC_LZ4_BUFFERSIZE_KEY,
          IO_COMPRESSION_CODEC_LZ4_BUFFERSIZE_DEFAULT);
  
      int compressionOverhead = Math.max((int)(bufferSize * 0.01), 10);
  
      return new BlockCompressorStream(out, compressor, bufferSize,
          compressionOverhead);
    }
docs: Create a {@link CompressionOutputStream} that will write to the given
  {@link OutputStream} with the given {@link Compressor}.
  
  @param out        the location for the final output stream
  @param compressor compressor to use
  @return a stream the user can write uncompressed data to have it compressed
  @throws IOException