writeTo method
Implementation
int writeTo(BytesBuffer out) {
if (bitLength > 32) {
var bs = toString().encodeLatin1Bytes();
assert(bs.isNotEmpty);
out.writeInt32(-bs.length);
out.writeBytes(bs);
return 4 + bs.length;
} else {
var bs = toInt().int32ToBytes();
assert(bs.length == 4);
out.writeByte(0);
out.writeAllBytes(bs);
return 1 + 4;
}
}