emitInsert function
Implementation
Uint8List emitInsert(Uint8List opcodes, Uint8List buffer, int length) {
var i;
if (length > 127) {
// TODO: Implement from the go code
throw Exception('invalid insert opcode');
}
opcodes.add(length);
for (i = 0; i < length; i++) {
opcodes.add(buffer[i]);
}
return opcodes;
}