javascript - Node.js convert buffer to Int8Array -
in client side, converting typedarray blob , transmitting server, check if info correct, want compare first 5 values on client side , server side,
on client side:
var filereader = new filereader(); filereader.onload = function() { callback(new int8array(this.result)); }; filereader.readasarraybuffer(blob);
(from read first 5 values in callback fn)
but on server, found code convert blob buffer, , understanding, buffer
, arraybuffer
not same, var buffer1 = new buffer( blob, 'binary' );
does buffer have similar dataview
of arraybuffer, how read first 5 values of buffer1
integers able in client side?
javascript node.js buffer blob
No comments:
Post a Comment