Bit.fromBinary constructor

Bit.fromBinary(
  1. Uint8List bytes
)

Creates a Bit from its binary representation.

Implementation

factory Bit.fromBinary(Uint8List bytes) {
  var buf = ByteData.view(bytes.buffer, bytes.offsetInBytes);
  var length = buf.getInt32(0);
  return Bit._(length, bytes.sublist(4));
}