Files
Aug2021-Cpp2IL-Dump/Assembly-CSharp/BestHTTP/Decompression/Zlib/DeflateManager.cs
T
2026-04-10 22:50:51 +02:00

2198 lines
60 KiB
C#

using System;
using BestHTTP.Extensions;
using Cpp2IlInjected;
namespace BestHTTP.Decompression.Zlib
{
// Token: 0x02001FA2 RID: 8098
[Token(Token = "0x2001FA2")]
internal sealed class DeflateManager
{
// Token: 0x0600CD25 RID: 52517 RVA: 0x002EEEA0 File Offset: 0x002ED0A0
[Token(Token = "0x600CD25")]
[Address(RVA = "0x19693D0", Offset = "0x19681D0", VA = "0x1819693D0")]
internal DeflateManager()
{
ZTree ztree = new ZTree();
this.treeLiterals = ztree;
ZTree ztree2 = new ZTree();
this.treeDistances = ztree2;
ZTree ztree3 = new ZTree();
this.treeBitLengths = ztree3;
int num = InternalConstants.MAX_BITS;
num++;
short[] array = new short[num];
this.bl_count = array;
int[] array2 = new int[InternalConstants.L_CODES];
this.heap = array2;
sbyte[] array3 = new sbyte[InternalConstants.L_CODES];
this.depth = array3;
this._WantRfc1950HeaderBytes = true;
base..ctor();
int num2 = DeflateManager.HEAP_SIZE;
num2 += num2;
short[] array4 = new short[num2];
this.dyn_ltree = array4;
short[] array5 = new short[InternalConstants.D_CODES];
this.dyn_dtree = array5;
short[] array6 = new short[InternalConstants.BL_CODES];
this.bl_tree = array6;
}
// Token: 0x0600CD26 RID: 52518 RVA: 0x002EEF6C File Offset: 0x002ED16C
[Token(Token = "0x600CD26")]
[Address(RVA = "0x1968B40", Offset = "0x1967940", VA = "0x181968B40")]
private void _InitializeLazyMatch()
{
int num = this.w_size;
int num2 = this.hash_size;
num += num;
short[] array = this.head;
int num3 = 0;
this.window_size = num;
Array.Clear(array, num3, num2);
int num4 = (int)this.compressionLevel;
DeflateManager.Config config;
this.config = config;
this.SetDeflater();
int num5 = 0;
this.strstart = num5;
this.block_start = num5;
this.lookahead = num5;
int min_MATCH = DeflateManager.MIN_MATCH;
this.match_available = num5;
this.prev_length = min_MATCH;
this.match_length = min_MATCH;
this.ins_h = num5;
}
// Token: 0x0600CD27 RID: 52519 RVA: 0x002EEFFC File Offset: 0x002ED1FC
[Token(Token = "0x600CD27")]
[Address(RVA = "0x1968C30", Offset = "0x1967A30", VA = "0x181968C30")]
private void _InitializeTreeData()
{
ZTree ztree = this.treeLiterals;
short[] array = this.dyn_ltree;
ztree.dyn_tree = array;
ZTree ztree2 = this.treeLiterals;
StaticTree literals = StaticTree.Literals;
ztree2.staticTree = literals;
ZTree ztree3 = this.treeDistances;
short[] array2 = this.dyn_dtree;
ztree3.dyn_tree = array2;
ZTree ztree4 = this.treeDistances;
StaticTree distances = StaticTree.Distances;
ztree4.staticTree = distances;
ZTree ztree5 = this.treeBitLengths;
short[] array3 = this.bl_tree;
ztree5.dyn_tree = array3;
ZTree ztree6 = this.treeBitLengths;
StaticTree bitLengths = StaticTree.BitLengths;
ztree6.staticTree = bitLengths;
int num = 0;
this.bi_buf = (short)num;
this.bi_valid = num;
this.last_eob_len = (int)((ulong)8L);
this._InitializeBlocks();
}
// Token: 0x0600CD28 RID: 52520 RVA: 0x002EF0BC File Offset: 0x002ED2BC
[Token(Token = "0x600CD28")]
[Address(RVA = "0x1968920", Offset = "0x1967720", VA = "0x181968920")]
internal void _InitializeBlocks()
{
int num = 0;
short[] array = this.dyn_ltree;
num++;
num += 2;
array[0] = (short)num;
if ("{il2cpp array field local2->}" == (ulong)2L || "{il2cpp array field local2->}" == num)
{
}
short[] array2 = this.dyn_dtree;
num++;
num += 2;
array2[0] = (short)num;
short[] array3 = this.bl_tree;
num++;
num += 2;
array3[0] = (short)num;
short[] array4 = this.dyn_ltree;
int num2 = DeflateManager.END_BLOCK;
num2 += num2;
uint num3;
array4[0] = (short)num3;
this.opt_len = num;
this.matches = num;
this.last_lit = num;
}
// Token: 0x0600CD29 RID: 52521 RVA: 0x002EF160 File Offset: 0x002ED360
[Token(Token = "0x600CD29")]
[Address(RVA = "0x196B330", Offset = "0x196A130", VA = "0x18196B330")]
internal void pqdownheap(short[] tree, int k)
{
int[] array = this.heap;
int num = this.heap_len;
int num2 = array[k];
int length = this.heap.Length;
int num3 = k + 1;
sbyte[] array2 = this.depth;
if (DeflateManager._IsSmaller(tree, num3, k, array2))
{
}
int[] array3 = this.heap;
sbyte[] array4 = this.depth;
if (!DeflateManager._IsSmaller(tree, num2, k, array4))
{
int[] array5 = this.heap;
int length2 = array5.Length;
int num4;
array5[0] = num4;
int num5 = this.heap_len;
}
int[] array6 = this.heap;
array6[0] = num2;
}
// Token: 0x0600CD2A RID: 52522 RVA: 0x002EF204 File Offset: 0x002ED404
[Token(Token = "0x600CD2A")]
[Address(RVA = "0x1968D70", Offset = "0x1967B70", VA = "0x181968D70")]
internal static bool _IsSmaller(short[] tree, int n, int m, sbyte[] depth)
{
int length = tree.Length;
short num;
short num2;
if (num < num2)
{
return true;
}
if (num != num2)
{
}
int length2 = depth.Length;
bool flag;
return flag;
}
// Token: 0x0600CD2B RID: 52523 RVA: 0x002EF234 File Offset: 0x002ED434
[Token(Token = "0x600CD2B")]
[Address(RVA = "0x196B5E0", Offset = "0x196A3E0", VA = "0x18196B5E0")]
internal void scan_tree(short[] tree, int max_code)
{
int length = tree.Length;
int i = 0;
uint num;
tree[0] = (short)num;
int num2 = 0;
num2 += 3;
uint num3;
if (1U < num3)
{
}
short[] array = this.bl_tree;
if (1UL > (ulong)10L)
{
int num4 = InternalConstants.REPZ_11_138;
num4 += num4;
}
int num5 = InternalConstants.REPZ_3_10;
num5 += num5;
short[] array2 = this.bl_tree;
short[] array3 = this.bl_tree;
int num6 = InternalConstants.REP_3_6;
num6 += num6;
short[] array4 = this.bl_tree;
i++;
num2 += 2;
while (i <= max_code)
{
}
}
// Token: 0x0600CD2C RID: 52524 RVA: 0x002EF2C8 File Offset: 0x002ED4C8
[Token(Token = "0x600CD2C")]
[Address(RVA = "0x196A870", Offset = "0x1969670", VA = "0x18196A870")]
internal int build_bl_tree()
{
int max_code = this.treeLiterals.max_code;
short[] array = this.dyn_ltree;
this.scan_tree(array, max_code);
int max_code2 = this.treeDistances.max_code;
short[] array2 = this.dyn_dtree;
this.scan_tree(array2, max_code2);
this.treeBitLengths.build_tree(this);
int i = InternalConstants.BL_CODES;
short[] array3 = this.bl_tree;
sbyte[] array4 = ZTree.bl_order;
i++;
if ("{il2cpp array field local12->}" == (ulong)0L)
{
while (i >= 3)
{
}
}
array4 += i;
return i;
}
// Token: 0x0600CD2D RID: 52525 RVA: 0x002EF354 File Offset: 0x002ED554
[Token(Token = "0x600CD2D")]
[Address(RVA = "0x196B920", Offset = "0x196A720", VA = "0x18196B920")]
internal void send_all_trees(int lcodes, int dcodes, int blcodes)
{
this.send_bits(lcodes, 5);
this.send_bits(lcodes, 5);
this.send_bits(lcodes, 4);
int num = 0;
if (blcodes > 0)
{
short[] array = this.bl_tree;
sbyte[] bl_order = ZTree.bl_order;
num++;
num++;
}
short[] array2 = this.dyn_ltree;
int num2 = lcodes - 1;
this.send_tree(array2, num2);
short[] array3 = this.dyn_dtree;
this.send_tree(array3, num2);
}
// Token: 0x0600CD2E RID: 52526 RVA: 0x002EF3C4 File Offset: 0x002ED5C4
[Token(Token = "0x600CD2E")]
[Address(RVA = "0x196C1E0", Offset = "0x196AFE0", VA = "0x18196C1E0")]
internal void send_tree(short[] tree, int max_code)
{
int num = 0;
int num2 = 0;
num2 += 3;
uint num3;
if (1U < num3)
{
}
if (1UL > (ulong)10L)
{
short[] array = this.bl_tree;
int repz_11_ = InternalConstants.REPZ_11_138;
this.send_code(repz_11_, array);
uint num4;
this.send_bits(repz_11_, (int)num4);
}
short[] array2 = this.bl_tree;
int repz_3_ = InternalConstants.REPZ_3_10;
this.send_code(repz_3_, array2);
this.send_bits(repz_3_, 3);
short[] array3 = this.bl_tree;
this.send_code((int)num3, array3);
short[] array4 = this.bl_tree;
int rep_3_ = InternalConstants.REP_3_6;
this.send_code(rep_3_, array4);
this.send_bits(rep_3_, 2);
short[] array5 = this.bl_tree;
this.send_code(rep_3_, array5);
num++;
num2 += 2;
}
// Token: 0x0600CD2F RID: 52527 RVA: 0x002EF484 File Offset: 0x002ED684
[Token(Token = "0x600CD2F")]
[Address(RVA = "0x196B590", Offset = "0x196A390", VA = "0x18196B590")]
private void put_bytes(byte[] p, int start, int len)
{
byte[] array = this.pending;
int num = this.pendingCount;
Array.Copy(p, start, array, num, len);
}
// Token: 0x0600CD30 RID: 52528 RVA: 0x002EF4AC File Offset: 0x002ED6AC
[Token(Token = "0x600CD30")]
[Address(RVA = "0x196BC40", Offset = "0x196AA40", VA = "0x18196BC40")]
internal void send_code(int c, short[] tree)
{
int length = tree.Length;
short num;
short num2;
this.send_bits((int)num, (int)num2);
}
// Token: 0x0600CD31 RID: 52529 RVA: 0x002EF4D0 File Offset: 0x002ED6D0
[Token(Token = "0x600CD31")]
[Address(RVA = "0x196BAA0", Offset = "0x196A8A0", VA = "0x18196BAA0")]
internal void send_bits(int value, int length)
{
int num = this.bi_valid;
int num2 = this.bi_valid;
int num3 = DeflateManager.Buf_size;
num3 -= length;
this.bi_buf = (short)value;
this.bi_valid = value;
}
// Token: 0x0600CD32 RID: 52530 RVA: 0x002EF518 File Offset: 0x002ED718
[Token(Token = "0x600CD32")]
[Address(RVA = "0x19699A0", Offset = "0x19687A0", VA = "0x1819699A0")]
internal void _tr_align()
{
int num = DeflateManager.STATIC_TREES;
num += num;
this.send_bits(num, 3);
int length = StaticTree.lengthAndLiteralsTreeCodes.Length;
short num2;
short num3;
this.send_bits((int)num2, (int)num3);
this.bi_flush();
int num4 = this.last_eob_len;
num4 += 11;
if (num4 < 9)
{
int num5 = DeflateManager.STATIC_TREES;
num5 += num5;
this.send_bits(num5, 3);
int length2 = StaticTree.lengthAndLiteralsTreeCodes.Length;
short num6;
short num7;
this.send_bits((int)num6, (int)num7);
this.bi_flush();
}
this.last_eob_len = (int)((ulong)7L);
}
// Token: 0x0600CD33 RID: 52531 RVA: 0x002EF5A8 File Offset: 0x002ED7A8
[Token(Token = "0x600CD33")]
[Address(RVA = "0x196A2A0", Offset = "0x19690A0", VA = "0x18196A2A0")]
internal bool _tr_tally(int dist, int lc)
{
byte[] array = this.pending;
int num = this.last_lit;
int distanceOffset = this._distanceOffset;
byte[] array2 = this.pending;
int num2 = this._distanceOffset;
num2++;
byte[] array3 = this.pending;
num2 = this._lengthOffset;
short[] array4 = this.dyn_ltree;
if (dist != 0)
{
sbyte[] lengthCode = ZTree.LengthCode;
int num3 = InternalConstants.LITERALS;
num3 += typeof(InternalConstants).TypeHandle;
int num4 = dist - 1;
short[] array5 = this.dyn_dtree;
int num5 = ZTree.DistanceCode(num4);
num5 += num5;
}
int num9;
if (this.last_lit == 8191 && this.compressionLevel > CompressionLevel.Level2)
{
int num6 = 0;
short[] array6 = this.dyn_dtree;
int[] extraDistanceBits = ZTree.ExtraDistanceBits;
num6++;
int num7 = extraDistanceBits[num6];
num7 += 5;
int num8 = num7 * num6;
num6 += 2;
num9 = this.last_lit;
num9 -= typeof(InternalConstants).TypeHandle;
if (this.matches < num9)
{
num9 -= typeof(InternalConstants).TypeHandle;
if (lc < num9)
{
}
}
}
int num10 = this.lit_bufsize - 1;
while (num9 == num10)
{
}
throw new NullReferenceException();
}
// Token: 0x0600CD34 RID: 52532 RVA: 0x002EF6C4 File Offset: 0x002ED8C4
[Token(Token = "0x600CD34")]
[Address(RVA = "0x196BCB0", Offset = "0x196AAB0", VA = "0x18196BCB0")]
internal void send_compressed_block(short[] ltree, short[] dtree)
{
int num = 0;
if (this.last_lit != num)
{
int num2 = this._distanceOffset;
byte[] array = this.pending;
num2 += num;
int length = array.Length;
int num3 = num2 + 1;
int num4 = this._lengthOffset;
num4 += num;
num += 2;
num++;
sbyte[] lengthCode = ZTree.LengthCode;
int num5 = InternalConstants.LITERALS;
num5 += num5;
int length2 = ltree.Length;
num5 += 3;
short num6 = ltree[num5];
short num7 = ltree[array];
this.send_bits((int)num7, (int)num6);
int[] extraLengthBits = ZTree.ExtraLengthBits;
int num8;
if (num8 != 0)
{
int[] lengthBase = ZTree.LengthBase;
byte b;
this.send_bits((int)b, num8);
}
byte b2;
int num9 = ZTree.DistanceCode((int)b2);
this.send_bits(1, (int)num6);
if (ZTree.ExtraDistanceBits[num9] != 0)
{
int[] distanceBase = ZTree.DistanceBase;
int length3 = ltree.Length;
num4++;
short num10 = ltree[num4];
short num11 = ltree[num4];
this.send_bits((int)num11, (int)num10);
}
if (num < this.last_lit)
{
}
}
int num12 = DeflateManager.END_BLOCK;
num12 += num12;
int length4 = ltree.Length;
short num13 = ltree[num12];
num12++;
short num14 = ltree[num12];
this.send_bits((int)num13, (int)num14);
int num15 = DeflateManager.END_BLOCK;
num15 += num15;
num15++;
this.last_eob_len = num15;
}
// Token: 0x0600CD35 RID: 52533 RVA: 0x002EF82C File Offset: 0x002EDA2C
[Token(Token = "0x600CD35")]
[Address(RVA = "0x196C4B0", Offset = "0x196B2B0", VA = "0x18196C4B0")]
internal void set_data_type()
{
short[] array = this.dyn_ltree;
int num = 0;
int length = array.Length;
num++;
num += 2;
if (num < 128)
{
num++;
}
short[] array2 = this.dyn_ltree;
num++;
num += array2;
if (num > num)
{
}
int z_ASCII = DeflateManager.Z_ASCII;
this.data_type = (sbyte)z_ASCII;
}
// Token: 0x0600CD36 RID: 52534 RVA: 0x002EF888 File Offset: 0x002EDA88
[Token(Token = "0x600CD36")]
[Address(RVA = "0x196A670", Offset = "0x1969470", VA = "0x18196A670")]
internal void bi_flush()
{
if (this.bi_valid != 16)
{
int num = this.pendingCount;
byte[] array = this.pending;
short num2 = this.bi_buf;
int num3 = num + 1;
this.pendingCount = num3;
this.bi_buf = (short)num3;
return;
}
int num4 = this.pendingCount;
byte[] array2 = this.pending;
short num5 = this.bi_buf;
int num6 = num4 + 1;
this.pendingCount = num6;
int num7 = this.pendingCount;
byte[] array3 = this.pending;
short num8 = this.bi_buf;
int num9 = num7 + 1;
this.pendingCount = num9;
int num10 = 0;
this.bi_buf = (short)num10;
this.bi_valid = num10;
}
// Token: 0x0600CD37 RID: 52535 RVA: 0x002EF92C File Offset: 0x002EDB2C
[Token(Token = "0x600CD37")]
[Address(RVA = "0x196A770", Offset = "0x1969570", VA = "0x18196A770")]
internal void bi_windup()
{
if (this.bi_valid > 0)
{
int num = this.pendingCount;
byte[] array = this.pending;
short num2 = this.bi_buf;
int num3 = num + 1;
this.pendingCount = num3;
int num4 = 0;
this.bi_buf = (short)num4;
this.bi_valid = num4;
return;
}
int num5 = 0;
this.bi_buf = (short)num5;
this.bi_valid = num5;
}
// Token: 0x0600CD38 RID: 52536 RVA: 0x002EF9E0 File Offset: 0x002EDBE0
[Token(Token = "0x600CD38")]
[Address(RVA = "0x196AA00", Offset = "0x1969800", VA = "0x18196AA00")]
internal void copy_block(int buf, int len, bool header)
{
this.bi_windup();
this.last_eob_len = (int)((ulong)8L);
if (header)
{
int num = this.pendingCount;
byte[] array = this.pending;
int num2 = num + 1;
this.pendingCount = num2;
int num3 = this.pendingCount;
byte[] array2 = this.pending;
int num4 = num3 + 1;
this.pendingCount = num4;
int num5 = this.pendingCount;
byte[] array3 = this.pending;
int num6 = num5 + 1;
this.pendingCount = num6;
int num7 = this.pendingCount;
byte[] array4 = this.pending;
int num8 = num7 + 1;
this.pendingCount = num8;
}
int num9 = this.pendingCount;
byte[] array5 = this.pending;
Array.Copy(this.window, buf, array5, num9, len);
}
// Token: 0x0600CD39 RID: 52537 RVA: 0x002EFA98 File Offset: 0x002EDC98
[Token(Token = "0x600CD39")]
[Address(RVA = "0x196AB60", Offset = "0x1969960", VA = "0x18196AB60")]
internal void flush_block_only(bool eof)
{
int num = this.block_start;
int num2 = this.strstart;
num2 -= num;
this._tr_flush_block(num, num2, eof);
ZlibCodec codec = this._codec;
int num3 = this.strstart;
this.block_start = num3;
codec.flush_pending();
}
// Token: 0x0600CD3A RID: 52538 RVA: 0x002EFAE4 File Offset: 0x002EDCE4
[Token(Token = "0x600CD3A")]
[Address(RVA = "0x1966700", Offset = "0x1965500", VA = "0x181966700")]
internal BlockState DeflateNone(FlushType flush)
{
int num3;
do
{
int num = this.pending.Length;
num += -5;
uint num2;
if (num < (int)num2)
{
}
num3 = 0;
int num4 = this.lookahead;
this._fillWindow();
int num5 = this.lookahead;
if (num5 == 0)
{
if (flush == FlushType.None)
{
break;
}
if (num5 == 0)
{
break;
}
}
int num6 = this.block_start;
int num7 = this.strstart;
this.lookahead = num3;
if (num5 != 0)
{
}
num7 -= this;
this.strstart = this;
this.lookahead = num7;
int num8 = 0;
this._tr_flush_block(num6, (int)num2, num8 != 0);
ZlibCodec codec = this._codec;
int num9 = this.strstart;
this.block_start = num9;
codec.flush_pending();
if (this._codec.AvailableBytesOut == num3)
{
break;
}
int num10 = this.strstart;
int num11 = this.block_start;
int num12 = this.w_size;
num10 -= num11;
int num13 = this.block_start;
int num14 = this.strstart;
int num15 = 0;
num14 -= num13;
this._tr_flush_block(num13, num14, num15 != 0);
ZlibCodec codec2 = this._codec;
int num16 = this.strstart;
this.block_start = num16;
codec2.flush_pending();
}
while (this._codec.AvailableBytesOut != num3);
bool flag = flush == FlushType.Finish;
this.flush_block_only(flag);
ZlibCodec codec3 = this._codec;
while (flush != FlushType.Finish)
{
}
throw new NullReferenceException();
}
// Token: 0x0600CD3B RID: 52539 RVA: 0x002EFC38 File Offset: 0x002EDE38
[Token(Token = "0x600CD3B")]
[Address(RVA = "0x196A0E0", Offset = "0x1968EE0", VA = "0x18196A0E0")]
internal void _tr_stored_block(int buf, int stored_len, bool eof)
{
this.send_bits(buf, 3);
this.bi_windup();
int num = this.pendingCount;
byte[] array = this.pending;
this.last_eob_len = (int)((ulong)8L);
int num2 = num + 1;
this.pendingCount = num2;
int num3 = this.pendingCount;
byte[] array2 = this.pending;
int num4 = num3 + 1;
this.pendingCount = num4;
int num5 = this.pendingCount;
byte[] array3 = this.pending;
int num6 = num5 + 1;
this.pendingCount = num6;
int num7 = this.pendingCount;
byte[] array4 = this.pending;
int num8 = num7 + 1;
this.pendingCount = num8;
int num9 = this.pendingCount;
byte[] array5 = this.pending;
Array.Copy(this.window, buf, array5, num9, stored_len);
}
// Token: 0x0600CD3C RID: 52540 RVA: 0x002EFCF4 File Offset: 0x002EDEF4
[Token(Token = "0x600CD3C")]
[Address(RVA = "0x1969BD0", Offset = "0x19689D0", VA = "0x181969BD0")]
internal void _tr_flush_block(int buf, int stored_len, bool eof)
{
int num = 0;
this.set_data_type();
this.treeLiterals.build_tree(this);
this.treeDistances.build_tree(this);
int max_code = this.treeLiterals.max_code;
short[] array = this.dyn_ltree;
this.scan_tree(array, max_code);
int max_code2 = this.treeDistances.max_code;
short[] array2 = this.dyn_dtree;
this.scan_tree(array2, max_code2);
this.treeBitLengths.build_tree(this);
int i = InternalConstants.BL_CODES;
short[] array3 = this.bl_tree;
sbyte[] bl_order = ZTree.bl_order;
i++;
if ("{il2cpp array field local22->}" == num)
{
while (i >= 3)
{
}
}
int num2 = this.static_len;
i += i;
num2 += 10;
int num3 = this.opt_len;
num3 += 10;
if (num2 <= num3)
{
num3 = num2;
}
if (buf != -1)
{
num3 = buf;
this._tr_stored_block(num3, stored_len, eof);
}
if (this != num3)
{
this.send_bits(num3, 3);
ZTree ztree = this.treeLiterals;
ZTree ztree2 = this.treeDistances;
int num4 = i + 1;
int max_code3 = ztree.max_code;
this.send_bits(num3, 5);
this.send_bits(num3, 5);
this.send_bits(num3, 4);
if (num4 > 0)
{
short[] array4 = this.bl_tree;
sbyte[] bl_order2 = ZTree.bl_order;
num++;
this.send_bits(num3, 3);
num++;
}
short[] array5 = this.dyn_ltree;
this.send_tree(array5, max_code3);
short[] array6 = this.dyn_dtree;
this.send_tree(array6, max_code3);
}
short[] distTreeCodes = StaticTree.distTreeCodes;
short[] lengthAndLiteralsTreeCodes = StaticTree.lengthAndLiteralsTreeCodes;
this.send_compressed_block(lengthAndLiteralsTreeCodes, distTreeCodes);
this._InitializeBlocks();
if (eof)
{
this.bi_windup();
}
}
// Token: 0x0600CD3D RID: 52541 RVA: 0x002EFE94 File Offset: 0x002EE094
[Token(Token = "0x600CD3D")]
[Address(RVA = "0x19695B0", Offset = "0x19683B0", VA = "0x1819695B0")]
private void _fillWindow()
{
do
{
int num = 0;
int num2 = this.window_size;
int num3 = this.strstart;
num2 -= num3;
int num4 = this.lookahead;
num2 -= num4;
int num7;
if (num3 != 0 || num4 != 0 || this.w_size != -1)
{
int num5 = this.w_size;
num5 += num5;
byte[] array = this.window;
int num6 = 0;
num7 = this.w_size;
Array.Copy(array, num7, array, num6, num7);
int num8 = this.hash_size;
num7 = num8;
short[] array2 = this.head;
short num9 = array2[num7];
int num10 = this.w_size;
num9 = (short)((int)num9 - num10);
array2[0] = (short)num;
int num11 = num8 - 1;
while (num11 != 0)
{
}
int num12 = this.w_size;
num7 = num12;
short[] array3 = this.prev;
short num13 = array3[num7];
int num14 = this.w_size;
num13 = (short)((int)num13 - num14);
array3[0] = (short)num;
int num15 = num12 - 1;
while (num15 != 0)
{
}
}
ZlibCodec codec = this._codec;
if (codec.AvailableBytesIn == 0)
{
break;
}
int num16 = this.lookahead;
byte[] array4 = this.window;
int num17 = this.strstart;
int num18 = codec.AvailableBytesIn;
if (num18 != 0)
{
num18 -= num18;
codec.AvailableBytesIn = num18;
if (codec.dstate._WantRfc1950HeaderBytes)
{
uint adler = codec._Adler32;
byte[] inputBuffer = codec.InputBuffer;
uint num19 = Adler.Adler32(adler, inputBuffer, num7, num18);
codec._Adler32 = num19;
}
int nextIn = codec.NextIn;
num16 += num17;
Array.Copy(codec.InputBuffer, nextIn, array4, num16, num18);
}
int num20 = this.lookahead;
byte[] array5 = this.window;
int num21 = this.strstart;
byte b;
this.ins_h = (int)b;
int num22 = num21 + 1;
this.ins_h = (int)b;
int num23 = this.lookahead;
}
while (this._codec.AvailableBytesIn != 0);
}
// Token: 0x0600CD3E RID: 52542 RVA: 0x002F008C File Offset: 0x002EE28C
[Token(Token = "0x600CD3E")]
[Address(RVA = "0x1966030", Offset = "0x1964E30", VA = "0x181966030")]
internal BlockState DeflateFast(FlushType flush)
{
do
{
int num = this.lookahead;
this._fillWindow();
int num2 = this.lookahead;
if (flush == FlushType.None)
{
break;
}
if (this.lookahead == 0)
{
break;
}
int num3 = this.lookahead;
int num4 = this.ins_h;
byte[] array = this.window;
int num5 = this.strstart;
int num6 = DeflateManager.MIN_MATCH;
num6 += num5;
short[] array2 = this.head;
this.ins_h = num4;
short num7 = array2[num4];
short[] array3 = this.prev;
int num8 = this.w_mask;
array3[0] = num7;
short[] array4 = this.head;
num8 = this.ins_h;
int num9 = this.strstart;
array4[0] = (short)num9;
int num10 = this.strstart;
int num11 = this.w_size;
num10 -= (int)num7;
if (this.compressionStrategy != CompressionStrategy.HuffmanOnly)
{
int num12 = this.longest_match((int)num7);
this.match_length = num12;
}
int num13 = this.match_length;
byte[] array5 = this.window;
int num14 = this.strstart;
int num15 = 0;
byte b;
bool flag = this._tr_tally(num15, (int)b);
int num16 = this.strstart;
int num17 = this.strstart;
int num18 = this.match_start;
if (this.treeBitLengths == (ulong)0L)
{
}
num17 -= num18;
bool flag2 = this._tr_tally(num17, num16);
int num19 = this.lookahead;
flag = flag2;
int num20 = this.match_length;
num19 -= num20;
DeflateManager.Config config = this.config;
this.lookahead = num19;
int num21 = this.strstart;
int num22 = this.ins_h;
byte[] array6 = this.window;
int num23 = DeflateManager.MIN_MATCH;
num23 += num21;
short[] array7 = this.head;
this.ins_h = num22;
short num24 = array7[num22];
short[] array8 = this.prev;
int num25 = this.w_mask;
array8[0] = num24;
short[] array9 = this.head;
int num26 = this.ins_h;
int num27 = this.strstart;
array9[0] = (short)num27;
while (num26 != array9.Length)
{
}
int num28 = this.strstart;
int num29 = 0;
byte[] array10 = this.window;
this.strstart = num28;
this.match_length = num29;
byte b2;
this.ins_h = (int)b2;
num28++;
this.ins_h = (int)b2;
while (!flag)
{
}
int num30 = this.block_start;
num28 -= num30;
int num31 = 0;
this._tr_flush_block(num30, num28, num31 != 0);
ZlibCodec codec = this._codec;
int num32 = this.strstart;
this.block_start = num32;
codec.flush_pending();
}
while (this._codec.AvailableBytesOut != 0);
int num33 = this.block_start;
int num34 = this.strstart;
bool flag3 = flush == FlushType.Finish;
num34 -= num33;
this._tr_flush_block(num33, num34, flag3);
ZlibCodec codec2 = this._codec;
int num35 = this.strstart;
this.block_start = num35;
codec2.flush_pending();
if (this._codec.AvailableBytesOut != 0)
{
}
throw new NullReferenceException();
}
// Token: 0x0600CD3F RID: 52543 RVA: 0x002F037C File Offset: 0x002EE57C
[Token(Token = "0x600CD3F")]
[Address(RVA = "0x1966940", Offset = "0x1965740", VA = "0x181966940")]
internal BlockState DeflateSlow(FlushType flush)
{
int num = 0;
int num2 = this.lookahead;
this._fillWindow();
int num3 = this.lookahead;
if (flush != FlushType.None)
{
if (this.lookahead != 0)
{
int num4 = this.lookahead;
int num5 = this.ins_h;
byte[] array = this.window;
int num6 = this.strstart;
int num7 = DeflateManager.MIN_MATCH;
num7 += num6;
short[] array2 = this.head;
this.ins_h = num5;
short num8 = array2[num5];
short[] array3 = this.prev;
int num9 = this.w_mask;
array3[0] = num8;
short[] array4 = this.head;
num9 = this.ins_h;
int num10 = this.strstart;
array4[0] = (short)num10;
int num11 = this.match_length;
this.prev_length = num11;
int num12 = this.match_start;
this.prev_match = num12;
int min_MATCH = DeflateManager.MIN_MATCH;
this.match_length = min_MATCH;
int maxLazy = this.config.MaxLazy;
if (this.prev_length < maxLazy)
{
int num13 = this.strstart;
int num14 = this.w_size;
num13 -= (int)num8;
if (this.compressionStrategy != CompressionStrategy.HuffmanOnly)
{
int num15 = this.longest_match((int)num8);
this.match_length = num15;
}
int num16 = this.match_length;
if (this.compressionStrategy == CompressionStrategy.Filtered || this.strstart > 4096)
{
int min_MATCH2 = DeflateManager.MIN_MATCH;
this.match_length = min_MATCH2;
}
}
int num17 = this.prev_length;
int num18 = this.prev_length;
int num19 = this.strstart;
int num20 = this.lookahead;
int num21 = this.strstart;
int num22 = this.prev_length;
num20 += num19;
bool flag = this._tr_tally(num21, num22);
int num23 = this.prev_length;
this.prev_length = 1;
int num24 = this.strstart;
num24++;
this.strstart = num24;
int num25 = this.ins_h;
byte[] array5 = this.window;
int num26 = DeflateManager.MIN_MATCH;
num26 += num24;
short[] array6 = this.head;
this.ins_h = num25;
short num27 = array6[num25];
short[] array7 = this.prev;
int num28 = this.w_mask;
array7[0] = num27;
short[] array8 = this.head;
int num29 = this.ins_h;
int num30 = this.strstart;
array8[0] = (short)num30;
while (num29 != array8.Length)
{
}
int num31 = 0;
this.match_available = num31;
int num32 = this.strstart;
num32++;
int min_MATCH3 = DeflateManager.MIN_MATCH;
this.strstart = num32;
this.match_length = min_MATCH3;
while (!flag)
{
}
int num33 = this.block_start;
num32 -= num33;
int num34 = 0;
this._tr_flush_block(num33, num32, num34 != 0);
ZlibCodec codec = this._codec;
int num35 = this.strstart;
this.block_start = num35;
codec.flush_pending();
if (this._codec.AvailableBytesOut == num31)
{
goto IL_393;
}
if (this.match_available == 0)
{
this.match_available = 1;
}
byte[] array9 = this.window;
int num36 = this.strstart;
int num37 = 0;
byte b;
if (this._tr_tally(num37, (int)b))
{
int num38 = this.block_start;
int num39 = this.strstart;
int num40 = 0;
num39 -= num38;
this._tr_flush_block(num38, num39, num40 != 0);
ZlibCodec codec2 = this._codec;
int num41 = this.strstart;
this.block_start = num41;
codec2.flush_pending();
}
if (this._codec.AvailableBytesOut == 0)
{
goto IL_393;
}
}
if (this.match_available != 0)
{
byte[] array10 = this.window;
int num42 = this.strstart;
int num43 = 0;
byte b2;
bool flag2 = this._tr_tally(num43, (int)b2);
this.match_available = num;
}
bool flag3 = flush == FlushType.Finish;
this.flush_block_only(flag3);
if (this._codec.AvailableBytesOut != 0)
{
}
}
IL_393:
throw new NullReferenceException();
}
// Token: 0x0600CD40 RID: 52544 RVA: 0x002F0724 File Offset: 0x002EE924
[Token(Token = "0x600CD40")]
[Address(RVA = "0x196ABD0", Offset = "0x19699D0", VA = "0x18196ABD0")]
internal int longest_match(int cur_match)
{
DeflateManager.Config config = this.config;
int num = this.strstart;
int num2 = this.prev_length;
int num3 = this.w_size;
if (num > num3)
{
int num4 = this.strstart;
int num5 = this.w_size;
int num6 = DeflateManager.MIN_LOOKAHEAD;
num6 -= num5;
num6 += num4;
}
int niceLength = this.config.NiceLength;
int num7 = this.w_mask;
int num8 = this.strstart;
int num9 = this.window.Length;
DeflateManager.Config config2 = this.config;
int num10 = this.lookahead;
if (niceLength <= num10)
{
}
int num11 = this.prev_length;
byte[] array = this.window;
int num12 = array.Length;
byte b;
if ("{il2cpp array field local22->}" == b)
{
num9 = num;
int num13 = num9 + 1;
num += 2;
num++;
num9 = num12;
int num14 = num9 + 1;
byte b2 = array[num14];
num++;
int num15 = num + 1;
num = num15;
num15 = num12;
num15 += 3;
num++;
int num16 = num + 1;
num = num16;
num16 = num12;
num16 += 5;
num++;
int num17 = num + 1;
num = num17;
num17 = num12;
num17 += 7;
byte b3 = array[num17];
int num18 = num + 1;
num = num18;
num12 += 8;
int num19 = DeflateManager.MAX_MATCH;
num19 -= num8;
num19 += num;
num = num8;
num -= num19;
if (num19 > num2)
{
num2 = num19;
this.match_start = cur_match;
int length = this.window.Length;
int num20 = cur_match - 1;
}
}
short[] array2 = this.prev;
ulong num21;
if ((ulong)array2[num7] > num21)
{
int num22 = niceLength - 1;
while (num22 != 0)
{
}
}
int num23 = this.lookahead;
if (num2 > num23)
{
num2 = num23;
}
return num2;
}
// Token: 0x170020A0 RID: 8352
// (get) Token: 0x0600CD41 RID: 52545 RVA: 0x002F08EC File Offset: 0x002EEAEC
// (set) Token: 0x0600CD42 RID: 52546 RVA: 0x002F0900 File Offset: 0x002EEB00
[Token(Token = "0x170020A0")]
internal bool WantRfc1950HeaderBytes
{
[Token(Token = "0x600CD41")]
[Address(RVA = "0x196ABC0", Offset = "0x19699C0", VA = "0x18196ABC0")]
get
{
return this._WantRfc1950HeaderBytes;
}
[Token(Token = "0x600CD42")]
[Address(RVA = "0x196C4A0", Offset = "0x196B2A0", VA = "0x18196C4A0")]
set
{
this._WantRfc1950HeaderBytes = value;
}
}
// Token: 0x0600CD43 RID: 52547 RVA: 0x002F0914 File Offset: 0x002EEB14
[Token(Token = "0x600CD43")]
[Address(RVA = "0x1967CC0", Offset = "0x1966AC0", VA = "0x181967CC0")]
internal int Initialize(ZlibCodec codec, CompressionLevel level)
{
int mem_LEVEL_DEFAULT = DeflateManager.MEM_LEVEL_DEFAULT;
int num;
return num;
}
// Token: 0x0600CD44 RID: 52548 RVA: 0x002F092C File Offset: 0x002EEB2C
[Token(Token = "0x600CD44")]
[Address(RVA = "0x1967C10", Offset = "0x1966A10", VA = "0x181967C10")]
internal int Initialize(ZlibCodec codec, CompressionLevel level, int bits)
{
int mem_LEVEL_DEFAULT = DeflateManager.MEM_LEVEL_DEFAULT;
int num;
return num;
}
// Token: 0x0600CD45 RID: 52549 RVA: 0x002F0944 File Offset: 0x002EEB44
[Token(Token = "0x600CD45")]
[Address(RVA = "0x1968010", Offset = "0x1966E10", VA = "0x181968010")]
internal int Initialize(ZlibCodec codec, CompressionLevel level, int bits, CompressionStrategy compressionStrategy)
{
int mem_LEVEL_DEFAULT = DeflateManager.MEM_LEVEL_DEFAULT;
int num;
return num;
}
// Token: 0x0600CD46 RID: 52550 RVA: 0x002F0958 File Offset: 0x002EEB58
[Token(Token = "0x600CD46")]
[Address(RVA = "0x1967D60", Offset = "0x1966B60", VA = "0x181967D60")]
internal int Initialize(ZlibCodec codec, CompressionLevel level, int windowBits, int memLevel, CompressionStrategy strategy)
{
this._codec = codec;
codec.Message = (ulong)0L;
this._codec.dstate = this;
this.w_bits = windowBits;
this.hash_bits = windowBits;
uint num;
this.w_size = (int)num;
uint num2 = num - 1U;
this.hash_size = (int)num;
this.w_mask = (int)num2;
uint num3 = num - 1U;
this.hash_mask = (int)num3;
int min_MATCH = DeflateManager.MIN_MATCH;
int num4 = windowBits - 1;
num4 += min_MATCH;
this.hash_shift = num4;
int num5 = 0;
byte[] array = VariableSizedBufferPool.Get((long)num4, num5 != 0);
int num6 = this.w_size;
this.window = array;
short[] array2 = new short[num6];
int num7 = this.hash_size;
this.prev = array2;
short[] array3 = new short[num7];
this.head = array3;
this.lit_bufsize = (int)num;
byte[] array4;
this.pending = array4;
int num8 = this.lit_bufsize;
this._distanceOffset = num8;
this.compressionLevel = level;
this._lengthOffset = num8;
this.compressionStrategy = CompressionStrategy.Default;
this.Reset();
return 0;
}
// Token: 0x0600CD47 RID: 52551 RVA: 0x002F0A5C File Offset: 0x002EEC5C
[Token(Token = "0x600CD47")]
[Address(RVA = "0x19680C0", Offset = "0x1966EC0", VA = "0x1819680C0")]
internal void Reset()
{
ZlibCodec codec = this._codec;
int num = 0;
codec.TotalBytesOut = (long)num;
codec.TotalBytesIn = (long)num;
this._codec.Message = num;
this.nextPending = num;
this.Rfc1950BytesEmitted = num != 0;
if ((this._WantRfc1950HeaderBytes ? 1 : 0) != num)
{
}
int busy_STATE = DeflateManager.BUSY_STATE;
this.status = busy_STATE;
this._codec._Adler32 = (uint)((ulong)1L);
this.last_flush = num;
ZTree ztree = this.treeLiterals;
short[] array = this.dyn_ltree;
ztree.dyn_tree = array;
ZTree ztree2 = this.treeLiterals;
StaticTree literals = StaticTree.Literals;
ztree2.staticTree = literals;
ZTree ztree3 = this.treeDistances;
short[] array2 = this.dyn_dtree;
ztree3.dyn_tree = array2;
ZTree ztree4 = this.treeDistances;
StaticTree distances = StaticTree.Distances;
ztree4.staticTree = distances;
ZTree ztree5 = this.treeBitLengths;
short[] array3 = this.bl_tree;
ztree5.dyn_tree = array3;
ZTree ztree6 = this.treeBitLengths;
StaticTree bitLengths = StaticTree.BitLengths;
ztree6.staticTree = bitLengths;
this.bi_buf = (short)num;
this.bi_valid = num;
this.last_eob_len = (int)((ulong)8L);
this._InitializeBlocks();
int num2 = this.w_size;
int num3 = this.hash_size;
num2 += num2;
short[] array4 = this.head;
int num4 = 0;
this.window_size = num2;
Array.Clear(array4, num4, num3);
int num5 = (int)this.compressionLevel;
DeflateManager.Config config;
this.config = config;
this.SetDeflater();
this.strstart = num;
this.block_start = num;
this.lookahead = num;
int min_MATCH = DeflateManager.MIN_MATCH;
this.match_available = num;
this.ins_h = num;
this.prev_length = min_MATCH;
this.match_length = min_MATCH;
}
// Token: 0x0600CD48 RID: 52552 RVA: 0x002F0C00 File Offset: 0x002EEE00
[Token(Token = "0x600CD48")]
[Address(RVA = "0x1967AB0", Offset = "0x19668B0", VA = "0x181967AB0")]
internal int End()
{
int num = this.status;
int num2 = this.status;
int num3 = this.status;
return -2;
}
// Token: 0x0600CD49 RID: 52553 RVA: 0x002F0C2C File Offset: 0x002EEE2C
[Token(Token = "0x600CD49")]
[Address(RVA = "0x19683E0", Offset = "0x19671E0", VA = "0x1819683E0")]
private void SetDeflater()
{
DeflateFlavor flavor = this.config.Flavor;
if (flavor == DeflateFlavor.Store || flavor == DeflateFlavor.Store || flavor == DeflateFlavor.Fast)
{
DeflateManager.CompressFunc compressFunc;
compressFunc.method_ptr = ldftn(DeflateNone);
compressFunc.method = ldftn(DeflateNone);
compressFunc.m_target = this;
this.DeflateFunction = compressFunc;
}
}
// Token: 0x0600CD4A RID: 52554 RVA: 0x002F0C80 File Offset: 0x002EEE80
[Token(Token = "0x600CD4A")]
[Address(RVA = "0x1968830", Offset = "0x1967630", VA = "0x181968830")]
internal int SetParams(CompressionLevel level, CompressionStrategy strategy)
{
int num = 0;
if (this.compressionLevel != level)
{
DeflateFlavor flavor = this.config.Flavor;
DeflateManager.Config config;
if (config.Flavor != flavor)
{
ZlibCodec codec = this._codec;
if (codec.TotalBytesIn != (long)num)
{
int num2 = codec.Deflate(FlushType.Partial);
}
}
this.compressionLevel = level;
this.config = config;
this.SetDeflater();
}
this.compressionStrategy = strategy;
return num;
}
// Token: 0x0600CD4B RID: 52555 RVA: 0x002F0CF4 File Offset: 0x002EEEF4
[Token(Token = "0x600CD4B")]
[Address(RVA = "0x1968480", Offset = "0x1967280", VA = "0x181968480")]
internal int SetDictionary(byte[] dictionary)
{
int num = 0;
int length = dictionary.Length;
int num2 = this.status;
ZlibCodec codec = this._codec;
uint adler = codec._Adler32;
int length2 = dictionary.Length;
int num3 = 0;
uint num4 = Adler.Adler32(adler, dictionary, num3, length2);
codec._Adler32 = num4;
int num5 = this.w_size;
if (length > num5)
{
int num6 = this.w_size;
int num7 = dictionary.Length;
num7 -= num6;
}
byte[] array = this.window;
int num8 = 0;
Array.Copy(dictionary, num, array, num8, length);
byte[] array2 = this.window;
this.strstart = length;
this.block_start = length;
byte b = array2[0];
this.ins_h = (int)b;
this.ins_h = (int)b;
int num9 = this.ins_h;
byte[] array3 = this.window;
int num10 = DeflateManager.MIN_MATCH;
num10 += num;
short[] array4 = this.head;
this.ins_h = num9;
short[] array5 = this.prev;
int num11 = this.w_mask;
short num12 = array4[num9];
array5[0] = num12;
short[] array6 = this.head;
int num13 = this.ins_h;
array6[0] = (short)num;
num++;
return 0;
}
// Token: 0x0600CD4C RID: 52556 RVA: 0x002F0E24 File Offset: 0x002EF024
[Token(Token = "0x600CD4C")]
[Address(RVA = "0x1967160", Offset = "0x1965F60", VA = "0x181967160")]
internal int Deflate(FlushType flush)
{
for (;;)
{
ZlibCodec codec = this._codec;
if (codec.OutputBuffer != (ulong)0L && (codec.InputBuffer != (ulong)0L || codec.AvailableBytesIn == 0))
{
int num = this.status;
if (flush == FlushType.Finish && this._codec.AvailableBytesOut != 0)
{
int num2 = this.last_flush;
int num3 = this.status;
this.last_flush = (int)flush;
CompressionLevel compressionLevel = this.compressionLevel;
if (this.strstart != 0)
{
int preset_DICT = DeflateManager.PRESET_DICT;
}
ulong num4;
num4 += (ulong)1L;
num4 += num4;
long num5 = (long)(num4 * (ulong)((uint)31));
int num6 = this.pendingCount;
byte[] array = this.pending;
int busy_STATE = DeflateManager.BUSY_STATE;
this.status = busy_STATE;
int num7 = num6 + 1;
this.pendingCount = num7;
int num8 = this.pendingCount;
byte[] array2 = this.pending;
int num9 = num8 + 1;
this.pendingCount = num9;
if (this.strstart != 0)
{
int num10 = this.pendingCount;
byte[] array3 = this.pending;
int num11 = num10 + 1;
this.pendingCount = num11;
uint adler = this._codec._Adler32;
int num12 = this.pendingCount;
byte[] array4 = this.pending;
int num13 = num12 + 1;
this.pendingCount = num13;
uint adler2 = this._codec._Adler32;
int num14 = this.pendingCount;
byte[] array5 = this.pending;
int num15 = num14 + 1;
this.pendingCount = num15;
uint adler3 = this._codec._Adler32;
int num16 = this.pendingCount;
byte[] array6 = this.pending;
int num17 = num16 + 1;
this.pendingCount = num17;
uint adler4 = this._codec._Adler32;
}
this._codec._Adler32 = (uint)((ulong)1L);
ZlibCodec codec2 = this._codec;
if (this.Z_ASCII != 0 || (codec2.AvailableBytesIn == 0 && flush != FlushType.Finish))
{
codec2.flush_pending();
if (this._codec.AvailableBytesOut == 0)
{
goto IL_38C;
}
}
int num18 = this.status;
if (this._codec.AvailableBytesIn == 0)
{
break;
}
}
}
}
if (this._codec.AvailableBytesIn == 0 && this.lookahead == 0)
{
if (flush == FlushType.None)
{
goto IL_2A6;
}
int num19 = this.status;
}
DeflateManager.CompressFunc deflateFunction = this.DeflateFunction;
BlockState blockState;
int num20 = (int)blockState;
if (blockState == BlockState.FinishStarted || blockState == BlockState.FinishDone)
{
int finish_STATE = DeflateManager.FINISH_STATE;
this.status = finish_STATE;
}
if (num20 == 0 || num20 == 2)
{
goto IL_38C;
}
if (num20 == 1)
{
if (flush != (FlushType)num20)
{
int num21 = 0;
int num22 = 0;
int num23 = 0;
int num24 = 0;
this._tr_stored_block(num24, num23, num22 != 0);
if (flush == FlushType.Full && this.hash_size > num21)
{
short[] array7 = this.head;
num21++;
array7[0] = (short)num21;
}
}
this._codec.flush_pending();
if (this._codec.AvailableBytesOut == 0)
{
goto IL_38C;
}
}
IL_2A6:
if (flush == FlushType.Finish && this._WantRfc1950HeaderBytes && !this.Rfc1950BytesEmitted)
{
int num25 = this.pendingCount;
byte[] array8 = this.pending;
int num26 = num25 + 1;
this.pendingCount = num26;
uint adler5 = this._codec._Adler32;
int num27 = this.pendingCount;
byte[] array9 = this.pending;
int num28 = num27 + 1;
this.pendingCount = num28;
uint adler6 = this._codec._Adler32;
int num29 = this.pendingCount;
byte[] array10 = this.pending;
int num30 = num29 + 1;
this.pendingCount = num30;
uint adler7 = this._codec._Adler32;
int num31 = this.pendingCount;
byte[] array11 = this.pending;
int num32 = num31 + 1;
this.pendingCount = num32;
uint adler8 = this._codec._Adler32;
this._codec.flush_pending();
this.Rfc1950BytesEmitted = true;
if (this.Z_ASCII == 0)
{
}
}
IL_38C:
throw new NullReferenceException();
}
// Token: 0x0600CD4D RID: 52557 RVA: 0x002F11C4 File Offset: 0x002EF3C4
// Note: this type is marked as 'beforefieldinit'.
[Token(Token = "0x600CD4D")]
[Address(RVA = "0x1968E30", Offset = "0x1967C30", VA = "0x181968E30")]
static DeflateManager()
{
string[] array = new string[10];
if ("need dictionary" != 0)
{
}
array[0] = "need dictionary";
if ("stream end" != 0)
{
}
array[1] = "stream end";
if ("" != 0)
{
}
array[2] = "";
if ("file error" != 0)
{
}
array[3] = "file error";
if ("stream error" != 0)
{
}
array[4] = "stream error";
if ("data error" != 0)
{
}
array[5] = "data error";
if ("insufficient memory" != 0)
{
}
array[6] = "insufficient memory";
if ("buffer error" != 0)
{
}
array[7] = "buffer error";
if ("incompatible version" != 0)
{
}
array[8] = "incompatible version";
if ("" != 0)
{
}
array[9] = "";
int num = 0;
DeflateManager._ErrorMessage = array;
DeflateManager.STORED_BLOCK = num;
DeflateManager.Z_BINARY = num;
int num2 = DeflateManager.MIN_MATCH;
int num3 = DeflateManager.MAX_MATCH;
num2++;
num3 += num2;
DeflateManager.MIN_LOOKAHEAD = num3;
}
// Token: 0x04008296 RID: 33430
[Token(Token = "0x4008296")]
private static readonly int MEM_LEVEL_MAX;
// Token: 0x04008297 RID: 33431
[Token(Token = "0x4008297")]
private static readonly int MEM_LEVEL_DEFAULT;
// Token: 0x04008298 RID: 33432
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x4008298")]
private DeflateManager.CompressFunc DeflateFunction;
// Token: 0x04008299 RID: 33433
[Token(Token = "0x4008299")]
private static readonly string[] _ErrorMessage;
// Token: 0x0400829A RID: 33434
[Token(Token = "0x400829A")]
private static readonly int PRESET_DICT;
// Token: 0x0400829B RID: 33435
[Token(Token = "0x400829B")]
private static readonly int INIT_STATE;
// Token: 0x0400829C RID: 33436
[Token(Token = "0x400829C")]
private static readonly int BUSY_STATE;
// Token: 0x0400829D RID: 33437
[Token(Token = "0x400829D")]
private static readonly int FINISH_STATE;
// Token: 0x0400829E RID: 33438
[Token(Token = "0x400829E")]
private static readonly int Z_DEFLATED;
// Token: 0x0400829F RID: 33439
[Token(Token = "0x400829F")]
private static readonly int STORED_BLOCK;
// Token: 0x040082A0 RID: 33440
[Token(Token = "0x40082A0")]
private static readonly int STATIC_TREES;
// Token: 0x040082A1 RID: 33441
[Token(Token = "0x40082A1")]
private static readonly int DYN_TREES;
// Token: 0x040082A2 RID: 33442
[Token(Token = "0x40082A2")]
private static readonly int Z_BINARY;
// Token: 0x040082A3 RID: 33443
[Token(Token = "0x40082A3")]
private static readonly int Z_ASCII;
// Token: 0x040082A4 RID: 33444
[Token(Token = "0x40082A4")]
private static readonly int Z_UNKNOWN;
// Token: 0x040082A5 RID: 33445
[Token(Token = "0x40082A5")]
private static readonly int Buf_size;
// Token: 0x040082A6 RID: 33446
[Token(Token = "0x40082A6")]
private static readonly int MIN_MATCH;
// Token: 0x040082A7 RID: 33447
[Token(Token = "0x40082A7")]
private static readonly int MAX_MATCH;
// Token: 0x040082A8 RID: 33448
[Token(Token = "0x40082A8")]
private static readonly int MIN_LOOKAHEAD;
// Token: 0x040082A9 RID: 33449
[Token(Token = "0x40082A9")]
private static readonly int HEAP_SIZE;
// Token: 0x040082AA RID: 33450
[Token(Token = "0x40082AA")]
private static readonly int END_BLOCK;
// Token: 0x040082AB RID: 33451
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x40082AB")]
internal ZlibCodec _codec;
// Token: 0x040082AC RID: 33452
[FieldOffset(Offset = "0x20")]
[Token(Token = "0x40082AC")]
internal int status;
// Token: 0x040082AD RID: 33453
[FieldOffset(Offset = "0x28")]
[Token(Token = "0x40082AD")]
internal byte[] pending;
// Token: 0x040082AE RID: 33454
[FieldOffset(Offset = "0x30")]
[Token(Token = "0x40082AE")]
internal int nextPending;
// Token: 0x040082AF RID: 33455
[FieldOffset(Offset = "0x34")]
[Token(Token = "0x40082AF")]
internal int pendingCount;
// Token: 0x040082B0 RID: 33456
[FieldOffset(Offset = "0x38")]
[Token(Token = "0x40082B0")]
internal sbyte data_type;
// Token: 0x040082B1 RID: 33457
[FieldOffset(Offset = "0x3C")]
[Token(Token = "0x40082B1")]
internal int last_flush;
// Token: 0x040082B2 RID: 33458
[FieldOffset(Offset = "0x40")]
[Token(Token = "0x40082B2")]
internal int w_size;
// Token: 0x040082B3 RID: 33459
[FieldOffset(Offset = "0x44")]
[Token(Token = "0x40082B3")]
internal int w_bits;
// Token: 0x040082B4 RID: 33460
[FieldOffset(Offset = "0x48")]
[Token(Token = "0x40082B4")]
internal int w_mask;
// Token: 0x040082B5 RID: 33461
[FieldOffset(Offset = "0x50")]
[Token(Token = "0x40082B5")]
internal byte[] window;
// Token: 0x040082B6 RID: 33462
[FieldOffset(Offset = "0x58")]
[Token(Token = "0x40082B6")]
internal int window_size;
// Token: 0x040082B7 RID: 33463
[FieldOffset(Offset = "0x60")]
[Token(Token = "0x40082B7")]
internal short[] prev;
// Token: 0x040082B8 RID: 33464
[FieldOffset(Offset = "0x68")]
[Token(Token = "0x40082B8")]
internal short[] head;
// Token: 0x040082B9 RID: 33465
[FieldOffset(Offset = "0x70")]
[Token(Token = "0x40082B9")]
internal int ins_h;
// Token: 0x040082BA RID: 33466
[FieldOffset(Offset = "0x74")]
[Token(Token = "0x40082BA")]
internal int hash_size;
// Token: 0x040082BB RID: 33467
[FieldOffset(Offset = "0x78")]
[Token(Token = "0x40082BB")]
internal int hash_bits;
// Token: 0x040082BC RID: 33468
[FieldOffset(Offset = "0x7C")]
[Token(Token = "0x40082BC")]
internal int hash_mask;
// Token: 0x040082BD RID: 33469
[FieldOffset(Offset = "0x80")]
[Token(Token = "0x40082BD")]
internal int hash_shift;
// Token: 0x040082BE RID: 33470
[FieldOffset(Offset = "0x84")]
[Token(Token = "0x40082BE")]
internal int block_start;
// Token: 0x040082BF RID: 33471
[FieldOffset(Offset = "0x88")]
[Token(Token = "0x40082BF")]
private DeflateManager.Config config;
// Token: 0x040082C0 RID: 33472
[FieldOffset(Offset = "0x90")]
[Token(Token = "0x40082C0")]
internal int match_length;
// Token: 0x040082C1 RID: 33473
[FieldOffset(Offset = "0x94")]
[Token(Token = "0x40082C1")]
internal int prev_match;
// Token: 0x040082C2 RID: 33474
[FieldOffset(Offset = "0x98")]
[Token(Token = "0x40082C2")]
internal int match_available;
// Token: 0x040082C3 RID: 33475
[FieldOffset(Offset = "0x9C")]
[Token(Token = "0x40082C3")]
internal int strstart;
// Token: 0x040082C4 RID: 33476
[FieldOffset(Offset = "0xA0")]
[Token(Token = "0x40082C4")]
internal int match_start;
// Token: 0x040082C5 RID: 33477
[FieldOffset(Offset = "0xA4")]
[Token(Token = "0x40082C5")]
internal int lookahead;
// Token: 0x040082C6 RID: 33478
[FieldOffset(Offset = "0xA8")]
[Token(Token = "0x40082C6")]
internal int prev_length;
// Token: 0x040082C7 RID: 33479
[FieldOffset(Offset = "0xAC")]
[Token(Token = "0x40082C7")]
internal CompressionLevel compressionLevel;
// Token: 0x040082C8 RID: 33480
[FieldOffset(Offset = "0xB0")]
[Token(Token = "0x40082C8")]
internal CompressionStrategy compressionStrategy;
// Token: 0x040082C9 RID: 33481
[FieldOffset(Offset = "0xB8")]
[Token(Token = "0x40082C9")]
internal short[] dyn_ltree;
// Token: 0x040082CA RID: 33482
[FieldOffset(Offset = "0xC0")]
[Token(Token = "0x40082CA")]
internal short[] dyn_dtree;
// Token: 0x040082CB RID: 33483
[FieldOffset(Offset = "0xC8")]
[Token(Token = "0x40082CB")]
internal short[] bl_tree;
// Token: 0x040082CC RID: 33484
[FieldOffset(Offset = "0xD0")]
[Token(Token = "0x40082CC")]
internal ZTree treeLiterals;
// Token: 0x040082CD RID: 33485
[FieldOffset(Offset = "0xD8")]
[Token(Token = "0x40082CD")]
internal ZTree treeDistances;
// Token: 0x040082CE RID: 33486
[FieldOffset(Offset = "0xE0")]
[Token(Token = "0x40082CE")]
internal ZTree treeBitLengths;
// Token: 0x040082CF RID: 33487
[FieldOffset(Offset = "0xE8")]
[Token(Token = "0x40082CF")]
internal short[] bl_count;
// Token: 0x040082D0 RID: 33488
[FieldOffset(Offset = "0xF0")]
[Token(Token = "0x40082D0")]
internal int[] heap;
// Token: 0x040082D1 RID: 33489
[FieldOffset(Offset = "0xF8")]
[Token(Token = "0x40082D1")]
internal int heap_len;
// Token: 0x040082D2 RID: 33490
[FieldOffset(Offset = "0xFC")]
[Token(Token = "0x40082D2")]
internal int heap_max;
// Token: 0x040082D3 RID: 33491
[FieldOffset(Offset = "0x100")]
[Token(Token = "0x40082D3")]
internal sbyte[] depth;
// Token: 0x040082D4 RID: 33492
[FieldOffset(Offset = "0x108")]
[Token(Token = "0x40082D4")]
internal int _lengthOffset;
// Token: 0x040082D5 RID: 33493
[FieldOffset(Offset = "0x10C")]
[Token(Token = "0x40082D5")]
internal int lit_bufsize;
// Token: 0x040082D6 RID: 33494
[FieldOffset(Offset = "0x110")]
[Token(Token = "0x40082D6")]
internal int last_lit;
// Token: 0x040082D7 RID: 33495
[FieldOffset(Offset = "0x114")]
[Token(Token = "0x40082D7")]
internal int _distanceOffset;
// Token: 0x040082D8 RID: 33496
[FieldOffset(Offset = "0x118")]
[Token(Token = "0x40082D8")]
internal int opt_len;
// Token: 0x040082D9 RID: 33497
[FieldOffset(Offset = "0x11C")]
[Token(Token = "0x40082D9")]
internal int static_len;
// Token: 0x040082DA RID: 33498
[FieldOffset(Offset = "0x120")]
[Token(Token = "0x40082DA")]
internal int matches;
// Token: 0x040082DB RID: 33499
[FieldOffset(Offset = "0x124")]
[Token(Token = "0x40082DB")]
internal int last_eob_len;
// Token: 0x040082DC RID: 33500
[FieldOffset(Offset = "0x128")]
[Token(Token = "0x40082DC")]
internal short bi_buf;
// Token: 0x040082DD RID: 33501
[FieldOffset(Offset = "0x12C")]
[Token(Token = "0x40082DD")]
internal int bi_valid;
// Token: 0x040082DE RID: 33502
[FieldOffset(Offset = "0x130")]
[Token(Token = "0x40082DE")]
private bool Rfc1950BytesEmitted;
// Token: 0x040082DF RID: 33503
[FieldOffset(Offset = "0x131")]
[Token(Token = "0x40082DF")]
private bool _WantRfc1950HeaderBytes;
// Token: 0x02001FA3 RID: 8099
[Token(Token = "0x2001FA3")]
internal sealed class CompressFunc : MulticastDelegate
{
// Token: 0x0600CD4E RID: 52558 RVA: 0x002F12DC File Offset: 0x002EF4DC
[Token(Token = "0x600CD4E")]
[Address(RVA = "0x448ED0", Offset = "0x447CD0", VA = "0x180448ED0")]
public CompressFunc(object @object, IntPtr method)
{
this.method = method;
this.m_target = @object;
}
// Token: 0x0600CD4F RID: 52559 RVA: 0x002F12F8 File Offset: 0x002EF4F8
[Token(Token = "0x600CD4F")]
[Address(RVA = "0x1960B40", Offset = "0x195F940", VA = "0x181960B40", Slot = "13")]
public BlockState Invoke(FlushType flush)
{
uint num;
do
{
Delegate[] delegates = this.delegates;
if (delegates != 0)
{
}
}
while (num == (uint)0);
throw new ExecutionEngineException();
}
// Token: 0x0600CD50 RID: 52560 RVA: 0x002F137C File Offset: 0x002EF57C
[Token(Token = "0x600CD50")]
[Address(RVA = "0x1960AC0", Offset = "0x195F8C0", VA = "0x181960AC0", Slot = "14")]
public IAsyncResult BeginInvoke(FlushType flush, AsyncCallback callback, object @object)
{
}
// Token: 0x0600CD51 RID: 52561 RVA: 0x002F138C File Offset: 0x002EF58C
[Token(Token = "0x600CD51")]
[Address(RVA = "0x458BC0", Offset = "0x4579C0", VA = "0x180458BC0", Slot = "15")]
public BlockState EndInvoke(IAsyncResult result)
{
throw new NullReferenceException();
}
}
// Token: 0x02001FA4 RID: 8100
[Token(Token = "0x2001FA4")]
internal class Config
{
// Token: 0x0600CD52 RID: 52562 RVA: 0x002F13A0 File Offset: 0x002EF5A0
[Token(Token = "0x600CD52")]
[Address(RVA = "0x18D7470", Offset = "0x18D6270", VA = "0x1818D7470")]
private Config(int goodLength, int maxLazy, int niceLength, int maxChainLength, DeflateFlavor flavor)
{
this.MaxChainLength = 0;
this.GoodLength = goodLength;
this.NiceLength = niceLength;
this.Flavor = DeflateFlavor.Store;
this.MaxLazy = maxLazy;
}
// Token: 0x0600CD53 RID: 52563 RVA: 0x002F13D8 File Offset: 0x002EF5D8
[Token(Token = "0x600CD53")]
[Address(RVA = "0x1960E20", Offset = "0x195FC20", VA = "0x181960E20")]
public static DeflateManager.Config Lookup(CompressionLevel level)
{
return DeflateManager.Config.Table[(int)level];
}
// Token: 0x0600CD54 RID: 52564 RVA: 0x002F13F8 File Offset: 0x002EF5F8
[Token(Token = "0x600CD54")]
[Address(RVA = "0x1960EB0", Offset = "0x195FCB0", VA = "0x181960EB0")]
static Config()
{
DeflateManager.Config[] array = new DeflateManager.Config[10];
int num = 0;
DeflateManager.Config config;
config.GoodLength = num;
config.NiceLength = num;
config.Flavor = (DeflateFlavor)num;
array[0] = config;
DeflateManager.Config config2;
config2.GoodLength = (int)((ulong)4L);
config2.MaxLazy = (int)((ulong)4L);
config2.NiceLength = (int)((ulong)8L);
config2.MaxChainLength = (int)((ulong)4L);
config2.Flavor = (DeflateFlavor)((ulong)1L);
array[1] = config2;
DeflateManager.Config config3;
config3.GoodLength = (int)((ulong)4L);
config3.MaxLazy = (int)((ulong)5L);
config3.NiceLength = (int)((ulong)16L);
config3.MaxChainLength = (int)((ulong)8L);
config3.Flavor = (DeflateFlavor)((ulong)1L);
array[2] = config3;
DeflateManager.Config config4;
config4.GoodLength = (int)((ulong)4L);
config4.MaxLazy = (int)((ulong)6L);
config4.NiceLength = (int)((ulong)32L);
config4.MaxChainLength = (int)((ulong)32L);
config4.Flavor = (DeflateFlavor)((ulong)1L);
array[3] = config4;
DeflateManager.Config config5;
config5.GoodLength = (int)((ulong)4L);
config5.MaxLazy = (int)((ulong)4L);
config5.NiceLength = (int)((ulong)16L);
config5.MaxChainLength = (int)((ulong)16L);
config5.Flavor = (DeflateFlavor)((ulong)2L);
array[4] = config5;
DeflateManager.Config config6;
config6.GoodLength = (int)((ulong)8L);
config6.MaxLazy = (int)((ulong)16L);
config6.NiceLength = (int)((ulong)32L);
config6.MaxChainLength = (int)((ulong)32L);
config6.Flavor = (DeflateFlavor)((ulong)2L);
array[5] = config6;
DeflateManager.Config config7;
config7.GoodLength = (int)((ulong)8L);
config7.MaxLazy = (int)((ulong)16L);
config7.NiceLength = (int)((ulong)128L);
config7.MaxChainLength = (int)((ulong)128L);
config7.Flavor = (DeflateFlavor)((ulong)2L);
array[6] = config7;
DeflateManager.Config config8;
config8.GoodLength = (int)((ulong)8L);
config8.MaxLazy = (int)((ulong)32L);
config8.NiceLength = (int)((ulong)128L);
config8.MaxChainLength = (int)((ulong)256L);
config8.Flavor = (DeflateFlavor)((ulong)2L);
array[7] = config8;
DeflateManager.Config config9;
config9.GoodLength = (int)((ulong)32L);
config9.MaxLazy = (int)((ulong)128L);
config9.NiceLength = (int)((ulong)258L);
config9.MaxChainLength = (int)((ulong)1024L);
config9.Flavor = (DeflateFlavor)((ulong)2L);
array[8] = config9;
DeflateManager.Config config10;
config10.GoodLength = (int)((ulong)32L);
config10.MaxLazy = (int)((ulong)258L);
config10.NiceLength = (int)((ulong)258L);
config10.MaxChainLength = (int)((ulong)4096L);
config10.Flavor = (DeflateFlavor)((ulong)2L);
array[9] = config10;
DeflateManager.Config.Table = array;
}
// Token: 0x040082E0 RID: 33504
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x40082E0")]
internal int GoodLength;
// Token: 0x040082E1 RID: 33505
[FieldOffset(Offset = "0x14")]
[Token(Token = "0x40082E1")]
internal int MaxLazy;
// Token: 0x040082E2 RID: 33506
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x40082E2")]
internal int NiceLength;
// Token: 0x040082E3 RID: 33507
[FieldOffset(Offset = "0x1C")]
[Token(Token = "0x40082E3")]
internal int MaxChainLength;
// Token: 0x040082E4 RID: 33508
[FieldOffset(Offset = "0x20")]
[Token(Token = "0x40082E4")]
internal DeflateFlavor Flavor;
// Token: 0x040082E5 RID: 33509
[Token(Token = "0x40082E5")]
private static readonly DeflateManager.Config[] Table;
}
}
}