LZMAEncoder
Date: 2017-02-08

org.tukaani.xz.lzma

## Class LZMAEncoder

- java.lang.Object
- - org.tukaani.xz.lzma.LZMAEncoder

-     public abstract class LZMAEncoder
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `MODE_FAST`
    `static int` | `MODE_NORMAL`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `encodeForLZMA1()` Compress for LZMA1.
    `boolean` | `encodeForLZMA2()` Compresses for LZMA2.
    `void` | `encodeLZMA1EndMarker()`
    `static int` | `getDistSlot(int dist)` Gets an integer [0, 63] matching the highest two bits of an integer.
    `static LZMAEncoder` | `getInstance(RangeEncoder rc, int lc, int lp, int pb, int mode, int dictSize, int extraSizeBefore, int niceLen, int mf, int depthLimit)`
    `LZEncoder` | `getLZEncoder()`
    `static int` | `getMemoryUsage(int mode, int dictSize, int extraSizeBefore, int mf)`
    `int` | `getUncompressedSize()`
    `void` | `reset()`
    `void` | `resetUncompressedSize()`

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

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

- - ### Field Detail

    - #### MODE_FAST

          public static final int MODE_FAST

      See Also:
        Constant Field Values

    - #### MODE_NORMAL

          public static final int MODE_NORMAL

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getMemoryUsage

          public static int getMemoryUsage(int mode,
                           int dictSize,
                           int extraSizeBefore,
                           int mf)

    - #### getInstance

          public static LZMAEncoder getInstance(RangeEncoder rc,
                                int lc,
                                int lp,
                                int pb,
                                int mode,
                                int dictSize,
                                int extraSizeBefore,
                                int niceLen,
                                int mf,
                                int depthLimit)

    - #### getDistSlot

          public static int getDistSlot(int dist)

      Gets an integer [0, 63] matching the highest two bits of an integer. This is like bit scan reverse (BSR) on x86 except that this also cares about the second highest bit.

    - #### getLZEncoder

          public LZEncoder getLZEncoder()

    - #### reset

          public void reset()

    - #### getUncompressedSize

          public int getUncompressedSize()

    - #### resetUncompressedSize

          public void resetUncompressedSize()

    - #### encodeForLZMA1

          public void encodeForLZMA1()
                              throws java.io.IOException

      Compress for LZMA1.
      Throws:
        `java.io.IOException`

    - #### encodeLZMA1EndMarker

          public void encodeLZMA1EndMarker()
                                    throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### encodeForLZMA2

          public boolean encodeForLZMA2()

      Compresses for LZMA2.
      Returns:
        true if the LZMA2 chunk became full, false otherwise