RangeDecoder class

Implements the LZMA range decoder for LZMADecoder on web targets.

On the web an int is a JavaScript number and the bitwise operators work on 32 bits, so the branchless masks used by the native implementation cannot be expressed. Every intermediate value here stays below 2^32 and the two possible outcomes are selected with a branch, which is what a JavaScript engine wants anyway.

Constructors

RangeDecoder()

Properties

code ↔ int
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
isOverrun → bool
no setter
range ↔ int
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

decodeByte(Uint16List probs, int baseIndex) → int
decodeDistance(Uint16List probs, int distState) → int
decodeLength(Uint16List probs, int posState) → int
decodeMatchedByte(Uint16List probs, int baseIndex, int matchByte) → int
initialize() → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readBit(RangeDecoderTable table, int index) → int
readBitRaw(Uint16List probs, int index) → int
readBittree(RangeDecoderTable table, int count) → int
readBittreeReverse(RangeDecoderTable table, int count) → int
readDirect(int count) → int
reset() → void
setBuffer(Uint8List data) → void
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

readAheadPadding → const int