diff --git a/minilzo-decompress.min.js b/minilzo-decompress.min.js index 601f40f..ad32df1 100644 --- a/minilzo-decompress.min.js +++ b/minilzo-decompress.min.js @@ -1 +1 @@ -!function(e,r){r(function(){return n});var n=function(){function e(e,r){var n,t,i=0;return r=r||4096,{alloc:function(r){return n=new e(t=r||8192)},require:function(u){if(u>t-i){var o=new e(t+=r*Math.ceil((t-i+u)/r));o.set(n),n=o}return i+=u,n},pack:function(e){return n.subarray(0,e||i)}}}function r(r,c,a){{var s=new e(Uint8Array,a),h=s.alloc(c),l=0,d=0,m=r[d],p=n,A=0;r.byteLength}if(m>17)if(d++,m-=17,4>m)p=f;else{h=s.require(m);do h[l++]=r[d++];while(--m>0);p=t}e:for(;;){var y=!1;switch(p){case n:if(m=r[d++],m>=16){p=i;continue e}if(0===m){for(;0===r[d];)m+=255,d++;m+=15+r[d++]}if(h=s.require(4),h[l++]=r[d++],h[l++]=r[d++],h[l++]=r[d++],h[l++]=r[d++],--m>0){h=s.require(m);do h[l++]=r[d++];while(--m>0)}case t:if(m=r[d++],m>=16){p=i;continue e}A=l-2049-(m>>2)-(r[d++]<<2),h=s.require(3),h[l++]=h[A++],h[l++]=h[A++],h[l++]=h[A],p=o;continue e;case i:if(m>=64){A=l-1,A-=m>>2&7,A-=r[d++]<<3,m=(m>>5)-1,p=u;continue e}if(m<32){if(16>m){A=l-1,A-=m>>2,A-=r[d++]<<2,h=s.require(2),h[l++]=h[A++],h[l++]=h[A],p=o;continue e}if(A=l,A-=(8&m)<<11,m&=7,0===m){for(;0===r[d];)m+=255,d++;m+=7+r[d++]}if(A-=r[d]+(r[d+1]<<8)>>2,d+=2,A===l)break e;A-=16384}else{if(m&=31,0===m){for(;0===r[d];)m+=255,d++;m+=31+r[d++]}A=l-1,A-=r[d]+(r[d+1]<<8)>>2,d+=2}if(m>=6&&l-A>=4){m+=2,h=s.require(m),y=!0;do h[l++]=h[A++];while(--m>0)}case u:if(!y){m+=2,h=s.require(m);do h[l++]=h[A++];while(--m>0)}case o:if(m=3&r[d-2],0===m){p=n;continue e}case f:h=s.require(1),h[l++]=r[d++],m>1&&(h=s.require(1),h[l++]=r[d++],m>2&&(h=s.require(1),h[l++]=r[d++])),m=r[d++],p=i;continue e}}return s.pack(l)}var n=1,t=2,i=3,u=4,o=5,f=6;return{decompress:function(e,n,t){return r(new Uint8Array(e),n,t)}}}()}(this,"object"==typeof module&&"function"!=typeof define?function(e){module.exports=e(require,exports,module)}:define); +!function(e,i){function t(){return{require:function(e){var i=this.c-this.l+e;if(i>0){var t=new Uint8Array(this.l+=this.blockSize*Math.ceil(i/this.blockSize));t.set(this.buf),this.buf=t}return this.c+=e,this.buf},alloc:function(e,i){return this.blockSize=this.roundUp(i||4096),this.c=0,this.l=0|this.roundUp(e),this.l+=this.blockSize-this.l%this.blockSize,this.buf=new Uint8Array(this.l),this.buf},roundUp:function(e){var i=e%4;return 0===i?e:e+4-i},reset:function(){this.c=0,this.l=this.buf.length},pack:function(e){return this.buf.subarray(0,e)}}}i(function(){return r});var r=function(){function e(e,i){{var t=1,r=2,n=3,u=4,o=5,f=6,c=i.buf,s=0,h=0,l=e[h],a=t,b=0;e.length}if(l>17)if(h++,l-=17,4>l)a=f;else{c=i.require(l);do c[s++]=e[h++];while(--l>0);a=r}e:for(;;){var d=!1;switch(a){case t:if(l=e[h++],l>=16){a=n;continue e}if(0===l){for(;0===e[h];)l+=255,h++;l+=15+e[h++]}l+=3,c=i.require(l);do c[s++]=e[h++];while(--l>0);case r:if(l=e[h++],l>=16){a=n;continue e}b=s-2049-(l>>2)-(e[h++]<<2),c=i.require(3),c[s++]=c[b++],c[s++]=c[b++],c[s++]=c[b],a=o;continue e;case n:if(l>=64){b=s-1-(l>>2&7)-(e[h++]<<3),l=(l>>5)-1,a=u;continue e}if(l<32){if(16>l){b=s-1-(l>>2)-(e[h++]<<2),c=i.require(2),c[s++]=c[b++],c[s++]=c[b],a=o;continue e}if(b=s-((8&l)<<11),l&=7,0===l){for(;0===e[h];)l+=255,h++;l+=7+e[h++]}if(b-=e[h]+(e[h+1]<<8)>>2,h+=2,b===s)break e;b-=16384}else{if(l&=31,0===l){for(;0===e[h];)l+=255,h++;l+=31+e[h++]}b=s-1-(e[h]+(e[h+1]<<8)>>2),h+=2}if(l>=6&&s-b>=4){d=!0,l+=2,c=i.require(l);do c[s++]=c[b++];while(--l>0)}case u:if(!d){l+=2,c=i.require(l);do c[s++]=c[b++];while(--l>0)}case o:if(l=3&e[h-2],0===l){a=t;continue e}case f:c=i.require(1),c[s++]=e[h++],l>1&&(c=i.require(1),c[s++]=e[h++],l>2&&(c=i.require(1),c[s++]=e[h++])),l=e[h++],a=n;continue e}}return i.pack(s)}return{decompress:function(i,t){var r;return t.require instanceof Function?(r=t,r.reset()):r=this.createFlexBuffer(t.initSize||i.length,t.blockSize||8192),e(i,r)},createFlexBuffer:function(e,i){var r=t();return r.alloc(e,i),r}}}()}(this,"object"==typeof module&&"function"!=typeof define?function(e){module.exports=e(require,exports,module)}:define);