iw6-mod/deps/protobuf/js/experimental/runtime/kernel/buffer_decoder_helper.js

19 lines
405 B
JavaScript
Raw Normal View History

2024-02-27 01:34:37 -05:00
/**
* @fileoverview Helper methods to create BufferDecoders.
*/
goog.module('protobuf.binary.bufferDecoderHelper');
const BufferDecoder = goog.require('protobuf.binary.BufferDecoder');
/**
* @param {...number} bytes
* @return {!BufferDecoder}
*/
function createBufferDecoder(...bytes) {
return BufferDecoder.fromArrayBuffer(new Uint8Array(bytes).buffer);
}
exports = {
createBufferDecoder,
};