Encode Int In Place - Node.js Number

Node.js examples for Number:Int

Description

Encode Int In Place

Demo Code


exports.encodeIntInPlace = function(value, buffer, index) {
  buffer[index + 3] = (value >> 24) & 0xff;      
  buffer[index + 2] = (value >> 16) & 0xff;
  buffer[index + 1] = (value >> 8) & 0xff;
  buffer[index] = value & 0xff;//from   w w  w . j a  va  2s. c o  m
}

Related Tutorials