Package org.apache.commons.compress.compressors

# Interface CompressorStreamProvider

All Known Implementing Classes:
  `CompressorStreamFactory`

public interface CompressorStreamProvider
Creates Compressor `CompressorInputStream`s and `CompressorOutputStream`s.

Since:
  1.13

- ## Method Summary

  Modifier and Type
  Method
  Description
  `CompressorInputStream`
  `createCompressorInputStream(String name, InputStream in, boolean decompressUntilEOF)`
  Creates a compressor input stream from a compressor name and an input stream.
  `CompressorOutputStream`
  `createCompressorOutputStream(String name, OutputStream out)`
  Creates a compressor output stream from a compressor name and an output stream.
  `Set<String>`
  `getInputStreamCompressorNames()`
  Gets all the input stream compressor names for this provider
  `Set<String>`
  `getOutputStreamCompressorNames()`
  Gets all the output stream compressor names for this provider

- ## Method Details

  - ### createCompressorInputStream

    CompressorInputStream createCompressorInputStream(String name, InputStream in, boolean decompressUntilEOF) throws CompressorException
    Creates a compressor input stream from a compressor name and an input stream.
    Parameters:
      `name` - of the compressor, i.e. "gz", "bzip2", "xz", "lzma", "pack200", "snappy-raw", "snappy-framed", "z" or "deflate"
      `in` - the input stream
      `decompressUntilEOF` - if true, decompress until the end of the input; if false, stop after the first stream and leave the input position to point to the next byte after the stream. This setting applies to the gzip, bzip2 and XZ formats only.
    Returns:
      compressor input stream
    Throws:
      `CompressorException` - if the compressor name is not known
      `IllegalArgumentException` - if the name or input stream is null

  - ### createCompressorOutputStream

    CompressorOutputStream createCompressorOutputStream(String name, OutputStream out) throws CompressorException
    Creates a compressor output stream from a compressor name and an output stream.
    Parameters:
      `name` - the compressor name, i.e. "gz", "bzip2", "xz", "pack200" or "deflate"
      `out` - the output stream
    Returns:
      the compressor output stream
    Throws:
      `CompressorException` - if the archiver name is not known
      `IllegalArgumentException` - if the archiver name or stream is null

  - ### getInputStreamCompressorNames

    Set<String> getInputStreamCompressorNames()
    Gets all the input stream compressor names for this provider
    Returns:
      all the input compressor names for this provider

  - ### getOutputStreamCompressorNames

    Set<String> getOutputStreamCompressorNames()
    Gets all the output stream compressor names for this provider
    Returns:
      all the output compressor names for this provider