BitReader class
Used for reading BitStrings
Constructors
- BitReader.new(BitString _bits, [int _offset = 0])
Properties
Methods
-
clone(
) → BitReader - Returns a copy of a BitReader, preserving current offset
-
loadAnyAddressOrNull(
) → Address? - Returns InternalAddress or ExternalAddress or null from current offset, and moves offset two positions in case of type == 0
-
loadBit(
) → int - Returns a single bit and moves offset one position
-
loadBits(
int n) → BitString - Returns a BitString of n bits at the current offset, and moves offset n positions
-
loadCoins(
) → BigInt - Returns var uint value (coins value) as a BigInt from current offset, and moves offset 4 + size * 8 positions
-
loadExternalAddress(
) → ExternalAddress - Returns ExternalAddress or null from current offset
-
loadExternalAddressOrNull(
) → ExternalAddress? - Returns ExternalAddress or null from current offset, and moves offset two positions in case of type == 0
-
loadInt(
int n) → int - Returns an int of n bits, and moves offset n positions
-
loadIntBig(
int n) → BigInt - Returns an int value of n bits as a BigInt, and moves offset n positions
-
loadInternalAddress(
) → InternalAddress - Returns InternalAddress from current offset
-
loadInternalAddressOrNull(
) → InternalAddress? - Returns InternalAddress or null from current offset, and moves offset two positions in case of type == 0
-
loadList(
int nbytes) → Uint8List - Returns a Uint8List of n bytes at the current offset, and moves offset n * 8 positions
-
loadPaddedBits(
int n) → BitString - Returns padded BitString of n bits to make it byte aligned, and moves offset by n positions. Used in BoC.
-
loadUint(
int n) → int - Returns a uint of n bits, and moves offset n positions
-
loadUintBig(
int n) → BigInt - Returns a uint value of n bits as a BigInt, and moves offset n positions
-
loadVarInt(
int n) → int - Returns var int value of n bits from current offset, and moves offset n + size * 8 positions
-
loadVarIntBig(
int n) → BigInt - Returns var int value of n bits as a BigInt from current offset, and moves offset n + size * 8 positions
-
loadVarUint(
int n) → int - Returns var uint value of n bits from current offset, and moves offset n + size * 8 positions
-
loadVarUintBig(
int n) → BigInt - Returns var uint value of n bits as a BigInt from current offset, and moves offset n + size * 8 positions
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
preloadBit(
) → int - Returns a single bit at the current offset
-
preloadBits(
int n) → BitString - Returns a BitString of n bits at the current offset
-
preloadCoins(
) → BigInt - Returns var uint value (coins value) as a BigInt from current offset
-
preloadInt(
int n) → int - Returns an int value of n bits
-
preloadIntBig(
int n) → BigInt - Returns an int value of n bits as a BigInt
-
preloadList(
int nbytes) → Uint8List - Returns a Uint8List of n bytes at the current offset
-
preloadUint(
int n) → int - Returns a uint value of n bits
-
preloadUintBig(
int n) → BigInt - Returns a uint value of n bits as a BigInt
-
preloadVarInt(
int n) → int - Returns var int value of n bits from current offset
-
preloadVarIntBig(
int n) → BigInt - Returns var int value of n bits as a BigInt from current offset
-
preloadVarUint(
int n) → int - Returns var uint value of n bits from current offset
-
preloadVarUintBig(
int n) → BigInt - Returns var uint value of n bits as a BigInt from current offset
-
reset(
) → void - Returns nothing, resets offset to the beginning of latest checkpoint
-
save(
) → void - Returns nothing, adds a new checkpoint at current offset
-
skip(
int n) → void - Returns nothing, skips n bits
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited