ch.qos.logback.core.rolling.helper

## Class Compressor

- java.lang.Object
- - ch.qos.logback.core.spi.ContextAwareBase
  - - ch.qos.logback.core.rolling.helper.Compressor

All Implemented Interfaces:
  ContextAware

    public class Compressor
    extends ContextAwareBase

The `Compression` class implements ZIP and GZ file compression/decompression methods.

Author:
  Ceki Gülcü

### Field Summary

### Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase

`context`

### Constructor Summary

Constructors
Constructor and Description
`Compressor(CompressionMode compressionMode)`

### Method Summary

Methods
`void` `compress(java.lang.String nameOfFile2Compress, java.lang.String nameOfCompressedFile, java.lang.String innerEntryName)`
`static java.lang.String` `computeFileNameStr_WCS(java.lang.String fileNamePatternStr, CompressionMode compressionMode)`
`java.lang.String` `toString()`

### Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase

`addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext`

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

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

### Constructor Detail

#### Compressor

    public Compressor(CompressionMode compressionMode)

### Method Detail

#### compress

    public void compress(java.lang.String nameOfFile2Compress,
                java.lang.String nameOfCompressedFile,
                java.lang.String innerEntryName)

Parameters:
  `nameOfFile2Compress` -
  `nameOfCompressedFile` -
  `innerEntryName` - The name of the file within the zip file. Use for ZIP compression.

#### computeFileNameStr_WCS

    public static java.lang.String computeFileNameStr_WCS(java.lang.String fileNamePatternStr,
                                          CompressionMode compressionMode)

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Object`