buffer-reverse
v1.0.1
Published
A lite module for reverse-operations on buffers
Downloads
630,871
Readme
buffer-reverse
A lite module for byte reverse on buffers.
Examples
var reverse = require("buffer-reverse")
var a = new Buffer('00ff0f', 'hex')
console.log(reverse(a))
// => <Buffer 0f ff 00>
Or for those seeking those few extra cycles, perform the operation in place:
var reverseInplace = require("buffer-reverse/inplace")
var a = new Buffer('00ff0f', 'hex')
console.log(reverseInplace(a))
// => <Buffer 0f ff 00>
// See that a has been mutated
console.log(a)
// => <Buffer 0f ff 00>