trim static method
Remove a series of 0x00 in the header and footer
final List<int> bytes = [0x00, 0x00, 0xFE, 0x00]
final resultBytes = ByteUtil.trim(bytes);
// resultBytes is [0xFE]
Implementation
static List<int> trim(List<int> bytes) {
final ret = trimEnd(trimStart(bytes));
return ret;
}