code: @Override
    public CompressionOutputStream createOutputStream(OutputStream out,
        Compressor compressor) throws IOException {
      if (!isNativeSnappyLoaded(conf)) {
        throw new CodecUnavailableException("native snappy library not available");
      }
      int bufferSize = conf.getInt(
          IO_COMPRESSION_CODEC_SNAPPY_BUFFERSIZE_KEY,
          IO_COMPRESSION_CODEC_SNAPPY_BUFFERSIZE_DEFAULT);
  
      int compressionOverhead = (bufferSize / 6) + 32;
  
      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