trimTrailingZero static method
Drops trailing zero bytes from bytes.
Implementation
static BuBytes trimTrailingZero(List<int> bytes) {
int offset = bytes.length;
while (offset != 0) {
if (bytes[offset - 1] != 0) break;
offset--;
}
return BuBytes(bytes.sublist(0, offset));
}