JCloudYu/beson · deserialize.esm.js
javascript logo
function __deserializeInt32(buffer, start, options) {
	let end = start + 4;
	let dataView = new DataView(buffer);
	let data = dataView.getInt32(start, true);
	return { anchor: end, value:options.use_native_types ? data : Int32.from(data) };
}
Similar code snippets
1.
JCloudYu/beson · deserialize.esm.js
Match rating: 78.79% · See similar code snippets
javascript logo
function __deserializeInt8(buffer, start, options) {
	let end = start + 1;
	let dataView = new DataView(buffer);
	let data = dataView.getInt8(start);
	return { anchor: end, value:options.use_native_types ? data : Int8.from(data) };
}
2.
JCloudYu/beson · deserialize.esm.js
Match rating: 76.07% · See similar code snippets
javascript logo
function __deserializeUInt32(buffer, start, options) {
	let end = start + 4;
	let dataView = new DataView(buffer);
	let data = dataView.getUint32(start, true);
	return { anchor: end, value:options.use_native_types ? data : UInt32.from(data) };
}
3.
JCloudYu/beson · deserialize.esm.js
Match rating: 74.03% · See similar code snippets
javascript logo
function __deserializeInt16(buffer, start, options) {
	let end = start + 2;
	let dataView = new DataView(buffer);
	let data = dataView.getInt16(start, true);
	return { anchor: end, value:options.use_native_types ? data : Int16.from(data) };
}
4.
JCloudYu/beson · deserialize.esm.js
Match rating: 72.31% · See similar code snippets
javascript logo
function __deserializeUInt8(buffer, start, options) {
	let end = start + 1;
	let dataView = new DataView(buffer);
	let data = dataView.getUint8(start);
	return { anchor: end, value:options.use_native_types ? data : UInt8.from(data) };
}
5.
JCloudYu/beson · deserialize.esm.js
Match rating: 66.33% · See similar code snippets
javascript logo
function __deserializeDate(buffer, start, options) {
	let end = start + 8;
	let dataView = new DataView(buffer);
	let data = new Date(dataView.getFloat64(start, true));
	return { anchor: end, value: data };
}
6.
JCloudYu/beson · deserialize.esm.js
Match rating: 65.89% · See similar code snippets
javascript logo
function __deserializeString(buffer, start, options) {
	let step = 1;
	let dataView = new DataView(buffer);
	let length = dataView.getUint32(start, true);
	start += 4;
	let end = start + length;
	let dataArray = [];
	for (let i = start; i < end; i += step) {
		dataArray.push(dataView.getUint8(i));
	}
	let data = UTF8Decode(Uint8Array.from(dataArray).buffer);
	return { anchor: end, value: data };
}
7.
JCloudYu/beson · deserialize.esm.js
Match rating: 58.29% · See similar code snippets
javascript logo
function __deserializeIntVar(buffer, start, options) {
	const dataBuff = new Uint8Array(buffer);
	if ( dataBuff[start] > 127 ) {
		throw new Error( "Cannot support IntVar whose size is greater than 127 bytes" );
	}
	
	
	
	let index = 0, data_size = dataBuff[start], end = start + 1;
	const result_buffer = new Uint8Array(data_size);
	while( data_size-- > 0 ) {
		result_buffer[index] = dataBuff[end];
		index++; end++;
	}


	let data = new IntVar(result_buffer);
	return { anchor: end, value: data };
}
8.
RethinkRobotics-opensource/rosnodejs · base_deserialize.js
Match rating: 57.63% · See similar code snippets
javascript logo
function Int32Deserializer(buffer, bufferOffset) {
  let val = buffer.readInt32LE(bufferOffset[0], true);
  bufferOffset[0] += 4;
  return val;
}
9.
SOHU-Co/kafka-node · protocol.js
Match rating: 44.15% · See similar code snippets
javascript logo
function (p) {
      request.Int32BE(p.partition).Int64BE(p.time).Int32BE(p.maxNum);
    }
10.
SOHU-Co/kafka-node · protocol.js
Match rating: 43.24% · See similar code snippets
javascript logo
function (p) {
      request.Int32BE(p.partition).Int64BE(p.offset).Int16BE(p.metadata.length).string(p.metadata);
    }