bytebuffer.js icon indicating copy to clipboard operation
bytebuffer.js copied to clipboard

Comparing two ByteBuffers i.e. equal method

Open courteous opened this issue 6 years ago • 2 comments

Hello would like to ask the following question: Is would it be possible to implement a method which is comparing 2 bytebuffer values on equality i.e. something like

bufVariable.equal(anotherBufferValue : ByteBuffer) : boolean

I have searched for such method but was not able to find it.

courteous avatar May 25 '18 14:05 courteous

Seems like a good addition, yeah. Something like ByteBuffer.compare(buf1, buf2), maybe.

dcodeIO avatar May 25 '18 15:05 dcodeIO

well whatever does the comparison will be suitable as long as the each bit/byte equals the other one , taking into account that they are the same ENDIAN. Please let me know if you decide to do that. Many thanks in advanced.

courteous avatar May 25 '18 15:05 courteous