Lines Matching refs:data
1 // Protocol Buffers - Google's data interchange format
48 * Javascript can't natively handle 64-bit data types, so to manipulate them we
1035 * @param {!jspb.ByteSource} data
1039 jspb.utils.byteSourceToUint8Array = function(data) {
1040 if (data.constructor === Uint8Array) {
1041 return /** @type {!Uint8Array} */(data);
1044 if (data.constructor === ArrayBuffer) {
1045 data = /** @type {!ArrayBuffer} */(data);
1046 return /** @type {!Uint8Array} */(new Uint8Array(data));
1049 if (typeof Buffer != 'undefined' && data.constructor === Buffer) {
1051 new Uint8Array(/** @type {?} */ (data)));
1054 if (data.constructor === Array) {
1055 data = /** @type {!Array<number>} */(data);
1056 return /** @type {!Uint8Array} */(new Uint8Array(data));
1059 if (data.constructor === String) {
1060 data = /** @type {string} */(data);
1061 return goog.crypt.base64.decodeStringToUint8Array(data);