bops
bops copied to clipboard
copy function
I think your copy function is one off. if I try to copy
var buf = buffer.create(32);
buffer.copy( buffer.from( 'abcdefg' ), buf, 0, 0, 5 );
console.log( buffer.to( buffer.subarray( buf, 0, 5 ) ) );
it outputs 'abcde' isn't it suppose to be 'abcdef' ? because that's index 0 1 2 3 4 5
it's kinda strange that beginning ( index 0) is inclusive but last index (index 5) isn't
I kinda doubt this issue is gonna be resolved looking at last commit I'll try to hack into the code and perhaps fork it somehow :) I don't know how send fixes to repository that isn't mine just yet...