• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/**
2 * @fileoverview Helper methods to create BufferDecoders.
3 */
4goog.module('protobuf.binary.bufferDecoderHelper');
5
6const BufferDecoder = goog.require('protobuf.binary.BufferDecoder');
7
8/**
9 * @param {...number} bytes
10 * @return {!BufferDecoder}
11 */
12function createBufferDecoder(...bytes) {
13  return BufferDecoder.fromArrayBuffer(new Uint8Array(bytes).buffer);
14}
15
16exports = {
17  createBufferDecoder,
18};
19