How to use the protobufjs/minimal.Reader function in protobufjs

To help you get started, we’ve selected a few protobufjs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dawg / vusic / src / models.js View on Github external
/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/
"use strict";

var $protobuf = require("protobufjs/minimal");

// Common aliases
var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;

// Exported root namespace
var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});

$root.Note = (function() {

    /**
     * Properties of a Note.
     * @exports INote
     * @interface INote
     * @property {number} id Note id
     * @property {number} time Note time
     * @property {number} duration Note duration
     */

    /**
github Tarnadas / net64plus / proto / ClientServerMessage.js View on Github external
/*eslint-disable block-scoped-var, no-redeclare, no-control-regex, no-prototype-builtins*/
"use strict";

var $protobuf = require("protobufjs/minimal");

// Common aliases
var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;

// Exported root namespace
var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});

$root.ClientServerMessage = (function() {

    /**
     * Properties of a ClientServerMessage.
     * @exports IClientServerMessage
     * @interface IClientServerMessage
     * @property {Compression|null} [compression] ClientServerMessage compression
     * @property {number|null} [uncompressedSize] ClientServerMessage uncompressedSize
     * @property {Uint8Array|null} [compressedData] ClientServerMessage compressedData
     * @property {IClientServer|null} [data] ClientServerMessage data
     */
github finos / plexus-interop / web / packages / web-example / src / greeting / server / gen / plexus-messages.js View on Github external
*
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/*eslint-disable block-scoped-var, no-redeclare, no-control-regex, no-prototype-builtins*/
"use strict";

var $protobuf = require("protobufjs/minimal");

// Common aliases
var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;

// Exported root namespace
var $root = $protobuf.roots.sample || ($protobuf.roots.sample = {});

$root.interop = (function() {

    /**
     * Namespace interop.
     * @exports interop
     * @namespace
     */
    var interop = {};

    interop.samples = (function() {

        /**
github Bit-Nation / BITNATION-Pangea-mobile / src / modules / chat / chat-service / compiled.js View on Github external
// @TODO CAREFUL!!! For some reason generated file is not working properly
// Applied find and replace: $root.api_proto.Profile -> api_proto.Profile.

/* eslint-disable */
"use strict";

var $protobuf = require("protobufjs/minimal");

// Common aliases
var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;

// Exported root namespace
var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});

$root.api_proto = (function() {

    /**
     * Namespace api_proto.
     * @exports api_proto
     * @namespace
     */
    var api_proto = {};

    api_proto.Profile = (function() {

        /**
github coast-team / sigver / lib / signaling_ws.cjs.js View on Github external
throw new SigverError(SigverError.KEY_ERROR, `The key ${key} is an empty string`);
    }
    if (key.length > KEY_LENGTH_LIMIT) {
      throw new SigverError(SigverError.KEY_ERROR, `The key length exceeds the limit of ${KEY_LENGTH_LIMIT} characters`);
    }
  }

  validateId(id) {
    if (typeof id !== 'string') {
      throw new SigverError(SigverError.MESSAGE_ERROR, `The joining id is not a string`);
    }
  }
}

/*eslint-disable block-scoped-var, no-redeclare, no-control-regex, no-prototype-builtins*/
const $Reader = $protobuf.Reader;
const $Writer = $protobuf.Writer;
const $util = $protobuf.util;

const $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});

const Incoming = $root.Incoming = (() => {

    function Incoming(properties) {
        if (properties) for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
    }

    Incoming.prototype.content = null;
    Incoming.prototype.joined = false;
    Incoming.prototype.ping = false;
    Incoming.prototype.pong = false;
github tensorflow / tfjs-converter / src / data / es6 / compiled_api.js View on Github external
/*eslint-disable block-scoped-var, no-redeclare, no-control-regex, no-prototype-builtins*/
import * as $protobuf from "protobufjs/minimal";
var $Reader = $protobuf.Reader, $util = $protobuf.util;
var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});
export var tensorflow = $root.tensorflow = (function () {
    var tensorflow = {};
    tensorflow.Any = (function () {
        function Any(p) {
            if (p)
                for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                    if (p[ks[i]] != null)
                        this[ks[i]] = p[ks[i]];
        }
        Any.prototype.typeUrl = "";
        Any.prototype.value = $util.newBuffer([]);
        Any.decode = function decode(r, l) {
            if (!(r instanceof $Reader))
                r = $Reader.create(r);
            var c = l === undefined ? r.len : r.pos + l, m = new $root.tensorflow.Any();