IntStreamTransformExtension extension

Extension to add our helper methods onto int streams

on

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 endianness. Treated as an unsigned value by default, to change set signed to true.
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 endianness.
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 endianness.