JCloudYu/beson · deserialize.esm.js
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) };
}
Similar code snippets
1.
JCloudYu/beson · deserialize.esm.js
Match rating: 78.79% · See similar code snippets
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) };
}
2.
JCloudYu/beson · deserialize.esm.js
Match rating: 77.3% · 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) };
}
3.
JCloudYu/beson · deserialize.esm.js
Match rating: 69.54% · 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 };
}
4.
JCloudYu/beson · deserialize.esm.js
Match rating: 68.99% · 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 };
}
5.
JCloudYu/beson · deserialize.esm.js
Match rating: 68.25% · See similar code snippets
javascript logo
function __deserializeFloat64(buffer, start, options) {
	let end = start + 8;
	let dataView = new DataView(buffer);
	let data = dataView.getFloat64(start, true);
	return { anchor: end, value: data };
}
6.
JCloudYu/beson · deserialize.esm.js
Match rating: 67.78% · See similar code snippets
javascript logo
function __deserializeObjectId(buffer, start, options) {
	let step = 1;
	let length = 12;
	let end = start + length;
	let dataView = new DataView(buffer);
	let dataArray = [];
	for (let i = start; i < end; i += step) {
		dataArray.push(dataView.getUint8(i));
	}
	let data = new ObjectId(Uint8Array.from(dataArray).buffer);
	return { anchor: end, value: data };
}
7.
JCloudYu/beson · deserialize.esm.js
Match rating: 67.26% · See similar code snippets
javascript logo
function __deserializeFloat32(buffer, start, options) {
	let end = start + 4;
	let dataView = new DataView(buffer);
	let data = dataView.getFloat32(start, true);
	return { anchor: end, value: data };
}
8.
JCloudYu/beson · deserialize.esm.js
Match rating: 63.38% · See similar code snippets
javascript logo
function __deserializeInt64(buffer, start, options) {
	let step = 4;
	let length = 2;
	let end = start + (step * length);
	let dataView = new DataView(buffer);
	let dataArray = [];
	for (let i = start; i < end; i += step) {
		dataArray.push(dataView.getUint32(i, true));
	}
	let data = new Int64(new Uint32Array(dataArray));
	return { anchor: end, value: data };
}
9.
romainhild/node-xmlrpc-socket · client.js
Match rating: 53.86% · See similar code snippets
javascript logo
function() {
	var deserializer = new Deserializer();
	that.stream.push(null);
    	deserializer.deserializeMethodResponse(that.stream, callback);
    }
10.
RethinkRobotics-opensource/rosnodejs · base_deserialize.js
Match rating: 52.5% · See similar code snippets
javascript logo
function Int16Deserializer(buffer, bufferOffset) {
  let val = buffer.readInt16LE(bufferOffset[0], true);
  bufferOffset[0] += 2;
  return val;
}