Class LZMAEncoder
java.lang.Object
org.graalvm.shadowed.org.tukaani.xz.lzma.LZMAEncoder
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidCompress for LZMA1.booleanCompresses for LZMA2.voidstatic intgetDistSlot(int dist) Gets an integer [0, 63] matching the highest two bits of an integer.static LZMAEncodergetInstance(RangeEncoder rc, int lc, int lp, int pb, int mode, int dictSize, int extraSizeBefore, int niceLen, int mf, int depthLimit, ArrayCache arrayCache) static intgetMemoryUsage(int mode, int dictSize, int extraSizeBefore, int mf) intvoidputArraysToCache(ArrayCache arrayCache) voidreset()void
-
Field Details
-
MODE_FAST
public static final int MODE_FAST- See Also:
-
MODE_NORMAL
public static final int MODE_NORMAL- See Also:
-
-
Method Details
-
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, ArrayCache arrayCache) -
putArraysToCache
-
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
-
reset
public void reset() -
getUncompressedSize
public int getUncompressedSize() -
resetUncompressedSize
public void resetUncompressedSize() -
encodeForLZMA1
-
encodeLZMA1EndMarker
- Throws:
IOException
-
encodeForLZMA2
public boolean encodeForLZMA2()Compresses for LZMA2.- Returns:
- true if the LZMA2 chunk became full, false otherwise
-