readBitStream method Null safety

BitStream readBitStream(
  1. {int bytes = 0,
  2. int bits = 0}
)

Reads a BitStream object from the stream of length bytes and bits

Implementation

BitStream readBitStream({int bytes = 0, int bits = 0}) {
  var op = BitStream();
  op.writeBytes(readBytes(bytes: bytes, bits: bits),
      bytes: bytes, bits: bits);
  return op;
}