/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE  AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE:  you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import * as tslib_1 from "tslib";
import { Stream, markType } from "igniteui-angular-core";
import { MemoryStream } from "igniteui-angular-core";
import { NotImplementedException } from "igniteui-angular-core";
import * as Pako from "pako";
/**
 * @hidden
 */
var GZipStream = /** @class */ (function (_super) {
    tslib_1.__extends(GZipStream, _super);
    function GZipStream(a, b) {
        var _this = _super.call(this) || this;
        _this._o = null;
        _this._entryStream = null;
        _this._o = a;
        if (b == 0) {
            var c = new Array(a.length);
            a.read(c, 0, c.length);
            _this._entryStream = new MemoryStream(2, (Pako.inflate(c)));
        }
        else {
            throw new NotImplementedException(0);
        }
        return _this;
    }
    Object.defineProperty(GZipStream.prototype, "_baseStream", {
        get: function () {
            return this._o;
        },
        enumerable: true,
        configurable: true
    });
    GZipStream.prototype.get_canRead = function () {
        return true;
    };
    Object.defineProperty(GZipStream.prototype, "canRead", {
        get: function () {
            return this.get_canRead();
        },
        enumerable: true,
        configurable: true
    });
    GZipStream.prototype.get_canSeek = function () {
        return true;
    };
    Object.defineProperty(GZipStream.prototype, "canSeek", {
        get: function () {
            return this.get_canSeek();
        },
        enumerable: true,
        configurable: true
    });
    GZipStream.prototype.get_canWrite = function () {
        return false;
    };
    Object.defineProperty(GZipStream.prototype, "canWrite", {
        get: function () {
            return this.get_canWrite();
        },
        enumerable: true,
        configurable: true
    });
    GZipStream.prototype.get_length = function () {
        return this._entryStream.length;
    };
    Object.defineProperty(GZipStream.prototype, "length", {
        get: function () {
            return this.get_length();
        },
        enumerable: true,
        configurable: true
    });
    GZipStream.prototype.get_position = function () {
        return this._entryStream.position;
    };
    GZipStream.prototype.set_position = function (a) {
        this._entryStream.position = a;
    };
    Object.defineProperty(GZipStream.prototype, "position", {
        get: function () {
            return this.get_position();
        },
        set: function (a) {
            this.set_position(a);
        },
        enumerable: true,
        configurable: true
    });
    GZipStream.prototype.disposeCore = function (a) {
        this._entryStream.dispose();
    };
    GZipStream.prototype.flush = function () {
        this._entryStream.flush();
    };
    GZipStream.prototype.read = function (a, b, c) {
        return this._entryStream.read(a, b, c);
    };
    GZipStream.prototype.seek = function (a, b) {
        return this._entryStream.seek(a, b);
    };
    GZipStream.prototype.setLength = function (a) {
        this._entryStream.setLength(a);
    };
    GZipStream.prototype.write = function (a, b, c) {
        this._entryStream.write(a, b, c);
    };
    GZipStream.$t = markType(GZipStream, 'GZipStream', Stream.$);
    return GZipStream;
}(Stream));
export { GZipStream };
//# sourceMappingURL=GZipStream.js.map