You cannot change the size of an ArrayBuffer, and so you cannot just delete an element and make it disappear. ArrayBuffer.prototype.slice will give you a copy of the buffer that can be the same size or smaller, so on its own it's no help either.
You could shift all the entries after position N (in your case 24) to the left, overwriting N with N+1, N+1 with N+2 etc. and in the end trimming the last value.
function deleteWithShift(arrayBuffer, position) {
var typedArray = new Uint8Array(arrayBuffer),
i;
for ( i = position+1; i < typedArray.length; i+=1 ) {
ui8Array[i-1] = ui8Array[i];
}
return ui8Array.buffer.slice(0, ui8Array.length-1);
}
You could also slice the buffer twice, before and after the position, and then merge the two arrays.
function deleteWithSliceAndMerge(arrayBuffer, position) {
var frontValues = new Uint8Array( arrayBuffer, 0, position ),
backValues = new Uint8Array( arrayBuffer, position+1 ),
mergedArray = new Uint8Array(frontValues.length + backValues.length);
mergedArray.set( frontValues );
mergedArray.set( backValues, position );
return mergedArray.buffer;
}