Package org.pgpainless.policy

# Class Policy.CompressionAlgorithmPolicy

java.lang.Object
org.pgpainless.policy.Policy.CompressionAlgorithmPolicy

Enclosing class:
  `Policy`

public static final class Policy.CompressionAlgorithmPolicy extends Object

## Constructor Summary

Constructors
Constructor
Description
`CompressionAlgorithmPolicy(CompressionAlgorithm defaultCompressionAlgorithm, List<CompressionAlgorithm> acceptableCompressionAlgorithms)`

## Method Summary

Modifier and Type
Method
Description
`static Policy.CompressionAlgorithmPolicy`
`anyCompressionAlgorithmPolicy()`
Policy that accepts any known compression algorithm and offers `CompressionAlgorithm.ZIP` as default algorithm.
`CompressionAlgorithm`
`defaultCompressionAlgorithm()`
`static Policy.CompressionAlgorithmPolicy`
`defaultCompressionAlgorithmPolicy()`
Deprecated.
not expressive - might be removed in a future release
`boolean`
`isAcceptable(int compressionAlgorithmTag)`
`boolean`
`isAcceptable(CompressionAlgorithm compressionAlgorithm)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### CompressionAlgorithmPolicy

public CompressionAlgorithmPolicy(CompressionAlgorithm defaultCompressionAlgorithm, List<CompressionAlgorithm> acceptableCompressionAlgorithms)

## Method Details

### defaultCompressionAlgorithm

public CompressionAlgorithm defaultCompressionAlgorithm()

### isAcceptable

public boolean isAcceptable(int compressionAlgorithmTag)

### isAcceptable

public boolean isAcceptable(CompressionAlgorithm compressionAlgorithm)

### defaultCompressionAlgorithmPolicy

@Deprecated public static Policy.CompressionAlgorithmPolicy defaultCompressionAlgorithmPolicy()
Deprecated.
not expressive - might be removed in a future release
Default `Policy.CompressionAlgorithmPolicy` of PGPainless. The default compression algorithm policy accepts any compression algorithm.

Returns:
  default algorithm policy

### anyCompressionAlgorithmPolicy

public static Policy.CompressionAlgorithmPolicy anyCompressionAlgorithmPolicy()
Policy that accepts any known compression algorithm and offers `CompressionAlgorithm.ZIP` as default algorithm.

Returns:
  compression algorithm policy