Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
toggle the byte ordering of a buffer
JavaScript
branch: master
Failed to load latest commit information.
example working example
test more passing checks
.travis.yml using travis
LICENSE package.json etc
index.js check for multiples of 8
package.json package.json etc
readme.markdown using travis

readme.markdown

endian-toggle

Toggle the byte ordering of a buffer.

build status

example

var toggle = require('endian-toggle');
var buf = new Buffer('abcd');

console.dir(buf);
console.dir(toggle(buf, 16));

<Buffer 61 62 63 64>
<Buffer 62 61 64 63>

methods

var toggle = require('endian-toggle')

toggle(buf, bits)

Return a new buffer from buf with toggled endianness at bits many bits.

install

With npm do:

npm install endian-toggle

license

MIT

Something went wrong with that request. Please try again.