org.apache.pdfbox.pdfwriter.compress

## Class CompressParameters

- java.lang.Object
- - org.apache.pdfbox.pdfwriter.compress.CompressParameters

    public class CompressParameters
    extends Object

An instance of this class centralizes and provides the configuration for a PDF compression.

Author:
  Christian Appl

### Field Summary

Fields
`static CompressParameters` `DEFAULT_COMPRESSION`
`static int` `DEFAULT_OBJECT_STREAM_SIZE`
`static CompressParameters` `NO_COMPRESSION`

### Constructor Summary

Constructors
Constructor and Description
`CompressParameters()`
`CompressParameters(int objectStreamSize)` Sets the number of objects, that can be contained in compressed object streams.

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `getObjectStreamSize()` Returns the number of objects, that can be contained in compressed object streams.
`boolean` `isCompress()` Indicates whether the creation of compressed object streams is enabled or not.

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

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

### Field Detail

#### DEFAULT_COMPRESSION

    public static final CompressParameters DEFAULT_COMPRESSION

#### NO_COMPRESSION

    public static final CompressParameters NO_COMPRESSION

#### DEFAULT_OBJECT_STREAM_SIZE

    public static final int DEFAULT_OBJECT_STREAM_SIZE

See Also:
  Constant Field Values

### Constructor Detail

#### CompressParameters

    public CompressParameters()

#### CompressParameters

    public CompressParameters(int objectStreamSize)

Sets the number of objects, that can be contained in compressed object streams. Higher object stream sizes may cause PDF readers to slow down during the rendering of PDF documents, therefore a reasonable value should be selected. A value of 0 disables the compression.

Parameters:
  `objectStreamSize` - The number of objects, that can be contained in compressed object streams.

### Method Detail

#### getObjectStreamSize

    public int getObjectStreamSize()

Returns the number of objects, that can be contained in compressed object streams. Higher object stream sizes may cause PDF readers to slow down during the rendering of PDF documents, therefore a reasonable value should be selected.

Returns:
  The number of objects, that can be contained in compressed object streams.

#### isCompress

    public boolean isCompress()

Indicates whether the creation of compressed object streams is enabled or not.

Returns:
  true if compression is enabled.