encodeLength static method
Implementation
static List<int> encodeLength(int length) {
if (length <= 127) {
return <int>[length];
}
final bytes = bigIntToBytes(BigInt.from(length));
return <int>[
bytes.length | 0x80,
...bytes,
];
}