s1-mod/deps/protobuf/js/experimental/runtime/kernel/buffer_decoder_helper.js
2024-02-27 03:09:30 -05:00

19 lines
405 B
JavaScript

/**
* @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,
};