In nodejs
console.log(new Buffer(12))
show
< Buffer 00 22 33 11 55 ...>
We know the ...
ignore the following bytes. Now I want to output the whole buffer with 12 bytes, what should I do?
toString('hex')
works great! My example splits every 2 characters for easier visual parsing.
buf.toString('hex').match(/../g).join(' ')