Top Fields Constructors Methods
org.tukaani.xz.lzma

pack-priv final Class LZMAEncoderFast

extends LZMAEncoder
Class Inheritance
Imports
org.tukaani.xz.ArrayCache, org.tukaani.xz.lz.LZEncoder, .Matches, org.tukaani.xz.rangecoder.RangeEncoder

Field Summary

Modifier and TypeField and Description
private static final int
private static final int
private Matches
Inherited from org.tukaani.xz.lzma.LZMAEncoder:
backliteralEncoderlzmatchLenEncoderMODE_FASTMODE_NORMALniceLenreadAheadrepLenEncoder

Constructor Summary

AccessConstructor and Description
pack-priv
LZMAEncoderFast(RangeEncoder rc, int lc, int lp, int pb, int dictSize, int extraSizeBefore, int niceLen, int mf, int depthLimit, ArrayCache arrayCache)

Method Summary

Modifier and TypeMethod and Description
private boolean
changePair(int smallDist, int bigDist)

pack-priv static int
getMemoryUsage(int dictSize, int extraSizeBefore, int mf)

pack-priv int
getNextSymbol()

Implements abstract org.tukaani.xz.lzma.LZMAEncoder.getNextSymbol.

Gets the next LZMA symbol.
Inherited from org.tukaani.xz.lzma.LZMAEncoder:
encodeForLZMA1encodeForLZMA2encodeLZMA1EndMarkergetAnyMatchPricegetAnyRepPricegetDistSlotgetInstancegetLongRepAndLenPricegetLongRepPricegetLZEncodergetMatchAndLenPricegetMatchesgetMemoryUsagegetNormalMatchPricegetShortRepPricegetUncompressedSizeputArraysToCacheresetresetUncompressedSizeskipupdatePrices

Field Detail

EXTRA_SIZE_AFTERback to summary
private static final int EXTRA_SIZE_AFTER
EXTRA_SIZE_BEFOREback to summary
private static final int EXTRA_SIZE_BEFORE
matchesback to summary
private Matches matches

Constructor Detail

LZMAEncoderFastback to summary
pack-priv LZMAEncoderFast(RangeEncoder rc, int lc, int lp, int pb, int dictSize, int extraSizeBefore, int niceLen, int mf, int depthLimit, ArrayCache arrayCache)

Method Detail

changePairback to summary
private boolean changePair(int smallDist, int bigDist)
getMemoryUsageback to summary
pack-priv static int getMemoryUsage(int dictSize, int extraSizeBefore, int mf)
getNextSymbolback to summary
pack-priv int getNextSymbol()

Implements abstract org.tukaani.xz.lzma.LZMAEncoder.getNextSymbol.

Doc from org.tukaani.xz.lzma.LZMAEncoder.getNextSymbol.

Gets the next LZMA symbol.

There are three types of symbols: literal (a single byte), repeated match, and normal match. The symbol is indicated by the return value and by the variable back.

Literal: back == -1 and return value is 1. The literal itself needs to be read from lz separately.

Repeated match: back is in the range [0, 3] and the return value is the length of the repeated match.

Normal match: back - REPS (back - 4) is the distance of the match and the return value is the length of the match.