mirror of
https://github.com/0x5eal/rbxts-pako.git
synced 2025-04-05 19:31:01 +01:00
2 lines
No EOL
5.2 KiB
JavaScript
2 lines
No EOL
5.2 KiB
JavaScript
/* pako 0.0.0 nodeca/pako */
|
|
!function(t){if("object"==typeof exports)module.exports=t();else if("function"==typeof define&&define.amd)define(t);else{var n;"undefined"!=typeof window?n=window:"undefined"!=typeof global?n=global:"undefined"!=typeof self&&(n=self),n.pako=t()}}(function(){return function t(n,i,e){function r(o,a){if(!i[o]){if(!n[o]){var f="function"==typeof require&&require;if(!a&&f)return f(o,!0);if(s)return s(o,!0);throw new Error("Cannot find module '"+o+"'")}var u=i[o]={exports:{}};n[o][0].call(u.exports,function(t){var i=n[o][1][t];return r(i?i:t)},u,u.exports,t,n,i,e)}return i[o].exports}for(var s="function"==typeof require&&require,o=0;o<e.length;o++)r(e[o]);return r}({1:[function(t,n,i){"use strict";function e(t,n){return t.length===n?t:a.typedOk()?t.subarray(0,n):t.slice(0,n)}function r(t,n){var i=new l(n);if(i.push(t,!0),i.err)throw u[i.err];return i.result}function s(t,n){return n=n||{},n.raw=!0,r(t,n)}var o=t("./zlib/inflate.js"),a=t("./zlib/utils"),f=t("./zlib/constants"),u=t("./zlib/messages"),h=t("./zlib/zstream"),l=function(t){this.options=a.assign({chunkSize:16384,windowBits:47},t||{});var n=this.options;n.raw&&n.windowBits>0&&(n.windowBits=-n.windowBits),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new h;var i=o.inflateInit2(this.strm,n.windowBits);if(i!==f.Z_OK)throw new Error(u[i])};l.prototype.push=function(t,n){var i,r,s=this.strm,u=this.options.chunkSize;if(this.ended)return!1;r=n===~~n?n:n===!0?f.Z_FINISH:f.Z_NO_FLUSH,s.next_in=t,s.next_in_index=0,s.avail_in=s.next_in.length,s.next_out=a.arrayCreate(u);do{if(s.avail_out=this.options.chunkSize,s.next_out_index=0,i=o.inflate(s,r),i!==f.Z_STREAM_END&&i!==f.Z_OK)return this.onEnd(i),this.ended=!0,!1;s.next_out_index&&(this.onData(e(s.next_out,s.next_out_index)),(s.avail_in>0||0===s.avail_out)&&(s.next_out=a.arrayCreate(this.options.chunkSize)))}while(s.avail_in>0||0===s.avail_out);return r===f.Z_FINISH?(i=o.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===f.Z_OK):!0},l.prototype.onData=function(t){this.chunks.push(t)},l.prototype.onEnd=function(t){t===f.Z_OK&&(this.result=a.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=u[t]},i.Inflate=l,i.inflate=r,i.inflateRaw=s},{"./zlib/constants":2,"./zlib/inflate.js":3,"./zlib/messages":4,"./zlib/utils":5,"./zlib/zstream":6}],2:[function(t,n){n.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],3:[function(t,n,i){"use strict";function e(){this.mode=-1,this.last=0,this.wrap=0,this.havedict=0,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=0,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=-1,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=-1,this.distcode=-1,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=0,this.lens=new Array(320),this.work=new Array(280),this.codes=new Array(v),this.sane=0,this.back=0,this.was=0}function r(){}function s(){}function o(){}function a(t){t.state=new e}function f(){}function u(){}function h(){}function l(){}function c(){}function _(){}function d(){}function p(){}function y(){}function w(){}function E(){}function Z(){}var R=852,S=592,v=R+S;i.inflateResetKeep=r,i.inflateReset=s,i.inflateReset2=o,i.inflateInit2=a,i.inflateInit=f,i.inflatePrime=u,i.inflate=h,i.inflateEnd=l,i.inflateGetDictionary=c,i.inflateGetHeader=d,i.inflateSetDictionary=_,i.inflateSync=p,i.inflateSyncPoint=y,i.inflateCopy=w,i.inflateUndermine=E,i.inflateMark=Z},{}],4:[function(t,n){"use strict";n.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],5:[function(t,n,i){"use strict";function e(){return r&&!i.forceUntyped}var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,s=Function.prototype.call.bind(Object.prototype.toString),o=Array.isArray||function(t){return"[object Array]"===s(t)};i.forceUntyped=!1,i.typedOk=e,i.assign=function(t){for(var n=Array.prototype.slice.call(arguments,1);n.length;){var i=n.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(var e in i)i.hasOwnProperty(e)&&(t[e]=i[e])}}return t},i.arraySet=function(t,n,i,r,s){if(e()&&!o(n))return void t.set(n.subarray(i,i+r),s);for(var a=0;r>a;a++)t[s+a]=n[i+a]},i.arrayCreate=function(t){return e()?new Uint8Array(t):new Array(t)},i.array16Create=function(t){return e()?new Uint16Array(t):new Array(t)},i.flattenChunks=function(t){var n,i,r,s,o,a;if(e()){for(r=0,n=0,i=t.length;i>n;n++)r+=t[n].length;for(a=new Uint8Array(r),s=0,n=0,i=t.length;i>n;n++)o=t[n],a.set(o,s),s+=o.length;return a}return[].concat.apply([],t)}},{}],6:[function(t,n){"use strict";function i(){this.next_in=null,this.avail_in=0,this.total_in=0,this.next_out=null,this.avail_out=0,this.total_out=0,this.state=null,this.data_type=2,this.adler=0}n.exports=i},{}]},{},[1])(1)}); |