# memLevel property

int memLevel
final

Specifies how much memory should be allocated for the internal compression state. `1` uses minimum memory but is slow and reduces compression ratio; `9` uses maximum memory for optimal speed. The default value is `8`.

The memory requirements for deflate are (in bytes):

    (1 << (windowBits + 2)) +  (1 << (memLevel + 9))

that is: 128K for windowBits = 15 + 128K for memLevel = 8 (default values)

## Implementation

    final int memLevel