IntStreamTransformExtension extension
Extension to add our helper methods onto int streams
Methods
-
asBigIntStream(
int maxBytes, {Endian endian = Endian.big, bool signed = false, bool sync = false, bool cancelOnError = false}) → Stream< BigInt> - Transform this stream into a BigInt stream
-
asDoubleStream(
{Endian endian = Endian.big, Precision precision = Precision.double, bool sync = false, bool cancelOnError = false}) → Stream< double> - Transform this stream into a double stream
-
asIntStream(
{Endian endian = Endian.big, IntType type = IntType.int64, bool sync = false, bool cancelOnError = false}) → Stream< int> - Transform this stream into an integer stream
-
readBigInt(
int maxBytes, {Endian endian = Endian.big, bool signed = false}) → Future< BigInt> -
Read a list of bytes from the stream and convert them to a BigInt respecting
endian
ness. Treated as an unsigned value by default, to change setsigned
totrue
. -
readDouble(
{Endian endian = Endian.big, Precision precision = Precision.double}) → Future< double> -
Read a list of bytes from the stream and convert them to a double respecting
endian
ness. -
readInt(
{Endian endian = Endian.big, IntType type = IntType.int64}) → Future< int> -
Read a list of bytes from the stream and convert them to an integer respecting
endian
ness.