Skip to content

A lite module for byte reversal on buffers.

License

Notifications You must be signed in to change notification settings

browserify/buffer-reverse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

buffer-reverse

NPM Package Build Status

js-standard-style

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>

License MIT

About

A lite module for byte reversal on buffers.

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •