compact_size library Null safety

Compact Size operations.

For numbers from 0 to 252, compactSize unsigned integers look like regular unsigned integers. For other numbers up to 0xffffffffffffffff, a byte is prefixed to the number to indicate its length—but otherwise the numbers look like regular unsigned integers in little-endian order.

From https://developer.bitcoin.org/reference/transactions.html#compactsize-unsigned-integers

Functions

decode(Uint8List bytes) → List<Uint8List>
Decodes a compact size prepended Uint8List.
encode(Uint8List uint8list) → Uint8List
Encodes a Uint8List into a compact size prepended Uint8List.
toInt(Uint8List compactSize) → int
Converts a compact size Uint8List into int.
toSize(Uint8List bytes) → Uint8List
Converts a Uint8List into its compact size representation.