UNPKG

muschema

Version:
33 lines 1.23 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); var _number_1 = require("./_number"); var MuUint8 = (function (_super) { __extends(MuUint8, _super); function MuUint8(value) { return _super.call(this, (value || 0) & 0xFF, 'uint8') || this; } MuUint8.prototype.diff = function (base, target, stream) { if ((base & 0xff) !== (target & 0xff)) { stream.grow(1); stream.writeUint8(target); return true; } return false; }; MuUint8.prototype.patch = function (base, stream) { return stream.readUint8(); }; return MuUint8; }(_number_1.MuNumber)); exports.MuUint8 = MuUint8; //# sourceMappingURL=uint8.js.map