Files
niko c12fbe3fc6 m
2026-04-12 16:51:38 +02:00

2183 lines
60 KiB
C#

using System;
using BestHTTP.Extensions;
using Cpp2IlInjected;
namespace BestHTTP.Decompression.Zlib
{
// Token: 0x02002082 RID: 8322
[Token(Token = "0x2002082")]
internal sealed class DeflateManager
{
// Token: 0x0600D0F3 RID: 53491 RVA: 0x002F7600 File Offset: 0x002F5800
[Token(Token = "0x600D0F3")]
[Address(RVA = "0x240D290", Offset = "0x240C290", VA = "0x18240D290")]
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: 0x0600D0F4 RID: 53492 RVA: 0x002F76CC File Offset: 0x002F58CC
[Token(Token = "0x600D0F4")]
[Address(RVA = "0x240CA00", Offset = "0x240BA00", VA = "0x18240CA00")]
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: 0x0600D0F5 RID: 53493 RVA: 0x002F775C File Offset: 0x002F595C
[Token(Token = "0x600D0F5")]
[Address(RVA = "0x240CAF0", Offset = "0x240BAF0", VA = "0x18240CAF0")]
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: 0x0600D0F6 RID: 53494 RVA: 0x002F781C File Offset: 0x002F5A1C
[Token(Token = "0x600D0F6")]
[Address(RVA = "0x240C7E0", Offset = "0x240B7E0", VA = "0x18240C7E0")]
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: 0x0600D0F7 RID: 53495 RVA: 0x002F78C0 File Offset: 0x002F5AC0
[Token(Token = "0x600D0F7")]
[Address(RVA = "0x240EDB0", Offset = "0x240DDB0", VA = "0x18240EDB0")]
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: 0x0600D0F8 RID: 53496 RVA: 0x002F7964 File Offset: 0x002F5B64
[Token(Token = "0x600D0F8")]
[Address(RVA = "0x240CC30", Offset = "0x240BC30", VA = "0x18240CC30")]
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: 0x0600D0F9 RID: 53497 RVA: 0x002F7994 File Offset: 0x002F5B94
[Token(Token = "0x600D0F9")]
[Address(RVA = "0x240F010", Offset = "0x240E010", VA = "0x18240F010")]
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: 0x0600D0FA RID: 53498 RVA: 0x002F7A28 File Offset: 0x002F5C28
[Token(Token = "0x600D0FA")]
[Address(RVA = "0x240E460", Offset = "0x240D460", VA = "0x18240E460")]
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: 0x0600D0FB RID: 53499 RVA: 0x002F7AB4 File Offset: 0x002F5CB4
[Token(Token = "0x600D0FB")]
[Address(RVA = "0x240F350", Offset = "0x240E350", VA = "0x18240F350")]
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: 0x0600D0FC RID: 53500 RVA: 0x002F7B24 File Offset: 0x002F5D24
[Token(Token = "0x600D0FC")]
[Address(RVA = "0x240FC10", Offset = "0x240EC10", VA = "0x18240FC10")]
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: 0x0600D0FD RID: 53501 RVA: 0x002F7BE4 File Offset: 0x002F5DE4
[Token(Token = "0x600D0FD")]
[Address(RVA = "0x10A7EA0", Offset = "0x10A6EA0", VA = "0x1810A7EA0")]
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: 0x0600D0FE RID: 53502 RVA: 0x002F7C0C File Offset: 0x002F5E0C
[Token(Token = "0x600D0FE")]
[Address(RVA = "0x240F670", Offset = "0x240E670", VA = "0x18240F670")]
internal void send_code(int c, short[] tree)
{
int length = tree.Length;
short num;
short num2;
this.send_bits((int)num, (int)num2);
}
// Token: 0x0600D0FF RID: 53503 RVA: 0x002F7C30 File Offset: 0x002F5E30
[Token(Token = "0x600D0FF")]
[Address(RVA = "0x240F4D0", Offset = "0x240E4D0", VA = "0x18240F4D0")]
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: 0x0600D100 RID: 53504 RVA: 0x002F7C78 File Offset: 0x002F5E78
[Token(Token = "0x600D100")]
[Address(RVA = "0x240D790", Offset = "0x240C790", VA = "0x18240D790")]
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: 0x0600D101 RID: 53505 RVA: 0x002F7D08 File Offset: 0x002F5F08
[Token(Token = "0x600D101")]
[Address(RVA = "0x240E090", Offset = "0x240D090", VA = "0x18240E090")]
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: 0x0600D102 RID: 53506 RVA: 0x002F7E24 File Offset: 0x002F6024
[Token(Token = "0x600D102")]
[Address(RVA = "0x240F6E0", Offset = "0x240E6E0", VA = "0x18240F6E0")]
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: 0x0600D103 RID: 53507 RVA: 0x002F7F8C File Offset: 0x002F618C
[Token(Token = "0x600D103")]
[Address(RVA = "0x240FED0", Offset = "0x240EED0", VA = "0x18240FED0")]
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: 0x0600D104 RID: 53508 RVA: 0x002F7FE8 File Offset: 0x002F61E8
[Token(Token = "0x600D104")]
[Address(RVA = "0x10A6F70", Offset = "0x10A5F70", VA = "0x1810A6F70")]
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: 0x0600D105 RID: 53509 RVA: 0x002F808C File Offset: 0x002F628C
[Token(Token = "0x600D105")]
[Address(RVA = "0x10A7070", Offset = "0x10A6070", VA = "0x1810A7070")]
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: 0x0600D106 RID: 53510 RVA: 0x002F8140 File Offset: 0x002F6340
[Token(Token = "0x600D106")]
[Address(RVA = "0x10A7300", Offset = "0x10A6300", VA = "0x1810A7300")]
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: 0x0600D107 RID: 53511 RVA: 0x002F81F8 File Offset: 0x002F63F8
[Token(Token = "0x600D107")]
[Address(RVA = "0x240E5F0", Offset = "0x240D5F0", VA = "0x18240E5F0")]
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: 0x0600D108 RID: 53512 RVA: 0x002F8244 File Offset: 0x002F6444
[Token(Token = "0x600D108")]
[Address(RVA = "0x240A5C0", Offset = "0x24095C0", VA = "0x18240A5C0")]
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: 0x0600D109 RID: 53513 RVA: 0x002F8398 File Offset: 0x002F6598
[Token(Token = "0x600D109")]
[Address(RVA = "0x240DED0", Offset = "0x240CED0", VA = "0x18240DED0")]
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: 0x0600D10A RID: 53514 RVA: 0x002F8454 File Offset: 0x002F6654
[Token(Token = "0x600D10A")]
[Address(RVA = "0x240D9C0", Offset = "0x240C9C0", VA = "0x18240D9C0")]
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: 0x0600D10B RID: 53515 RVA: 0x002F85F4 File Offset: 0x002F67F4
[Token(Token = "0x600D10B")]
[Address(RVA = "0x240D470", Offset = "0x240C470", VA = "0x18240D470")]
private void _fillWindow()
{
int num;
do
{
num = 0;
int num2 = this.window_size;
int num3 = this.strstart;
num2 -= num3;
int num4 = this.lookahead;
num2 -= num4;
if (num3 != 0 || num4 != 0 || this.w_size != -1)
{
int num5 = this.w_size;
num5 += num5;
byte[] array = this.window;
int num6 = 0;
int 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 == num)
{
break;
}
int num16 = this.lookahead;
byte[] array4 = this.window;
uint num18;
int num17 = codec.read_buf(array4, num16, (int)num18);
int num19 = this.lookahead;
byte[] array5 = this.window;
int num20 = this.strstart;
byte b;
this.ins_h = (int)b;
int num21 = num20 + 1;
this.ins_h = (int)b;
int num22 = this.lookahead;
}
while (this._codec.AvailableBytesIn != num);
}
// Token: 0x0600D10C RID: 53516 RVA: 0x002F8770 File Offset: 0x002F6970
[Token(Token = "0x600D10C")]
[Address(RVA = "0x2409EF0", Offset = "0x2408EF0", VA = "0x182409EF0")]
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: 0x0600D10D RID: 53517 RVA: 0x002F8A60 File Offset: 0x002F6C60
[Token(Token = "0x600D10D")]
[Address(RVA = "0x240A800", Offset = "0x2409800", VA = "0x18240A800")]
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: 0x0600D10E RID: 53518 RVA: 0x002F8E08 File Offset: 0x002F7008
[Token(Token = "0x600D10E")]
[Address(RVA = "0x240E650", Offset = "0x240D650", VA = "0x18240E650")]
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: 0x1700213D RID: 8509
// (get) Token: 0x0600D10F RID: 53519 RVA: 0x002F8FD0 File Offset: 0x002F71D0
// (set) Token: 0x0600D110 RID: 53520 RVA: 0x002F8FE4 File Offset: 0x002F71E4
[Token(Token = "0x1700213D")]
internal bool WantRfc1950HeaderBytes
{
[Token(Token = "0x600D10F")]
[Address(RVA = "0x10A74D0", Offset = "0x10A64D0", VA = "0x1810A74D0")]
get
{
return this._WantRfc1950HeaderBytes;
}
[Token(Token = "0x600D110")]
[Address(RVA = "0x10A8DB0", Offset = "0x10A7DB0", VA = "0x1810A8DB0")]
set
{
this._WantRfc1950HeaderBytes = value;
}
}
// Token: 0x0600D111 RID: 53521 RVA: 0x002F8FF8 File Offset: 0x002F71F8
[Token(Token = "0x600D111")]
[Address(RVA = "0x240BB80", Offset = "0x240AB80", VA = "0x18240BB80")]
internal int Initialize(ZlibCodec codec, CompressionLevel level)
{
int mem_LEVEL_DEFAULT = DeflateManager.MEM_LEVEL_DEFAULT;
int num;
return num;
}
// Token: 0x0600D112 RID: 53522 RVA: 0x002F9010 File Offset: 0x002F7210
[Token(Token = "0x600D112")]
[Address(RVA = "0x240BAD0", Offset = "0x240AAD0", VA = "0x18240BAD0")]
internal int Initialize(ZlibCodec codec, CompressionLevel level, int bits)
{
int mem_LEVEL_DEFAULT = DeflateManager.MEM_LEVEL_DEFAULT;
int num;
return num;
}
// Token: 0x0600D113 RID: 53523 RVA: 0x002F9028 File Offset: 0x002F7228
[Token(Token = "0x600D113")]
[Address(RVA = "0x240BED0", Offset = "0x240AED0", VA = "0x18240BED0")]
internal int Initialize(ZlibCodec codec, CompressionLevel level, int bits, CompressionStrategy compressionStrategy)
{
int mem_LEVEL_DEFAULT = DeflateManager.MEM_LEVEL_DEFAULT;
int num;
return num;
}
// Token: 0x0600D114 RID: 53524 RVA: 0x002F903C File Offset: 0x002F723C
[Token(Token = "0x600D114")]
[Address(RVA = "0x240BC20", Offset = "0x240AC20", VA = "0x18240BC20")]
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: 0x0600D115 RID: 53525 RVA: 0x002F9140 File Offset: 0x002F7340
[Token(Token = "0x600D115")]
[Address(RVA = "0x240BF80", Offset = "0x240AF80", VA = "0x18240BF80")]
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: 0x0600D116 RID: 53526 RVA: 0x002F92E4 File Offset: 0x002F74E4
[Token(Token = "0x600D116")]
[Address(RVA = "0x240B970", Offset = "0x240A970", VA = "0x18240B970")]
internal int End()
{
int num = this.status;
int num2 = this.status;
int num3 = this.status;
return -2;
}
// Token: 0x0600D117 RID: 53527 RVA: 0x002F9310 File Offset: 0x002F7510
[Token(Token = "0x600D117")]
[Address(RVA = "0x240C2A0", Offset = "0x240B2A0", VA = "0x18240C2A0")]
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: 0x0600D118 RID: 53528 RVA: 0x002F9364 File Offset: 0x002F7564
[Token(Token = "0x600D118")]
[Address(RVA = "0x240C6F0", Offset = "0x240B6F0", VA = "0x18240C6F0")]
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: 0x0600D119 RID: 53529 RVA: 0x002F93D8 File Offset: 0x002F75D8
[Token(Token = "0x600D119")]
[Address(RVA = "0x240C340", Offset = "0x240B340", VA = "0x18240C340")]
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: 0x0600D11A RID: 53530 RVA: 0x002F9508 File Offset: 0x002F7708
[Token(Token = "0x600D11A")]
[Address(RVA = "0x240B020", Offset = "0x240A020", VA = "0x18240B020")]
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: 0x0600D11B RID: 53531 RVA: 0x002F98A8 File Offset: 0x002F7AA8
// Note: this type is marked as 'beforefieldinit'.
[Token(Token = "0x600D11B")]
[Address(RVA = "0x240CCF0", Offset = "0x240BCF0", VA = "0x18240CCF0")]
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: 0x0400844F RID: 33871
[Token(Token = "0x400844F")]
private static readonly int MEM_LEVEL_MAX;
// Token: 0x04008450 RID: 33872
[Token(Token = "0x4008450")]
private static readonly int MEM_LEVEL_DEFAULT;
// Token: 0x04008451 RID: 33873
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x4008451")]
private DeflateManager.CompressFunc DeflateFunction;
// Token: 0x04008452 RID: 33874
[Token(Token = "0x4008452")]
private static readonly string[] _ErrorMessage;
// Token: 0x04008453 RID: 33875
[Token(Token = "0x4008453")]
private static readonly int PRESET_DICT;
// Token: 0x04008454 RID: 33876
[Token(Token = "0x4008454")]
private static readonly int INIT_STATE;
// Token: 0x04008455 RID: 33877
[Token(Token = "0x4008455")]
private static readonly int BUSY_STATE;
// Token: 0x04008456 RID: 33878
[Token(Token = "0x4008456")]
private static readonly int FINISH_STATE;
// Token: 0x04008457 RID: 33879
[Token(Token = "0x4008457")]
private static readonly int Z_DEFLATED;
// Token: 0x04008458 RID: 33880
[Token(Token = "0x4008458")]
private static readonly int STORED_BLOCK;
// Token: 0x04008459 RID: 33881
[Token(Token = "0x4008459")]
private static readonly int STATIC_TREES;
// Token: 0x0400845A RID: 33882
[Token(Token = "0x400845A")]
private static readonly int DYN_TREES;
// Token: 0x0400845B RID: 33883
[Token(Token = "0x400845B")]
private static readonly int Z_BINARY;
// Token: 0x0400845C RID: 33884
[Token(Token = "0x400845C")]
private static readonly int Z_ASCII;
// Token: 0x0400845D RID: 33885
[Token(Token = "0x400845D")]
private static readonly int Z_UNKNOWN;
// Token: 0x0400845E RID: 33886
[Token(Token = "0x400845E")]
private static readonly int Buf_size;
// Token: 0x0400845F RID: 33887
[Token(Token = "0x400845F")]
private static readonly int MIN_MATCH;
// Token: 0x04008460 RID: 33888
[Token(Token = "0x4008460")]
private static readonly int MAX_MATCH;
// Token: 0x04008461 RID: 33889
[Token(Token = "0x4008461")]
private static readonly int MIN_LOOKAHEAD;
// Token: 0x04008462 RID: 33890
[Token(Token = "0x4008462")]
private static readonly int HEAP_SIZE;
// Token: 0x04008463 RID: 33891
[Token(Token = "0x4008463")]
private static readonly int END_BLOCK;
// Token: 0x04008464 RID: 33892
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x4008464")]
internal ZlibCodec _codec;
// Token: 0x04008465 RID: 33893
[FieldOffset(Offset = "0x20")]
[Token(Token = "0x4008465")]
internal int status;
// Token: 0x04008466 RID: 33894
[FieldOffset(Offset = "0x28")]
[Token(Token = "0x4008466")]
internal byte[] pending;
// Token: 0x04008467 RID: 33895
[FieldOffset(Offset = "0x30")]
[Token(Token = "0x4008467")]
internal int nextPending;
// Token: 0x04008468 RID: 33896
[FieldOffset(Offset = "0x34")]
[Token(Token = "0x4008468")]
internal int pendingCount;
// Token: 0x04008469 RID: 33897
[FieldOffset(Offset = "0x38")]
[Token(Token = "0x4008469")]
internal sbyte data_type;
// Token: 0x0400846A RID: 33898
[FieldOffset(Offset = "0x3C")]
[Token(Token = "0x400846A")]
internal int last_flush;
// Token: 0x0400846B RID: 33899
[FieldOffset(Offset = "0x40")]
[Token(Token = "0x400846B")]
internal int w_size;
// Token: 0x0400846C RID: 33900
[FieldOffset(Offset = "0x44")]
[Token(Token = "0x400846C")]
internal int w_bits;
// Token: 0x0400846D RID: 33901
[FieldOffset(Offset = "0x48")]
[Token(Token = "0x400846D")]
internal int w_mask;
// Token: 0x0400846E RID: 33902
[FieldOffset(Offset = "0x50")]
[Token(Token = "0x400846E")]
internal byte[] window;
// Token: 0x0400846F RID: 33903
[FieldOffset(Offset = "0x58")]
[Token(Token = "0x400846F")]
internal int window_size;
// Token: 0x04008470 RID: 33904
[FieldOffset(Offset = "0x60")]
[Token(Token = "0x4008470")]
internal short[] prev;
// Token: 0x04008471 RID: 33905
[FieldOffset(Offset = "0x68")]
[Token(Token = "0x4008471")]
internal short[] head;
// Token: 0x04008472 RID: 33906
[FieldOffset(Offset = "0x70")]
[Token(Token = "0x4008472")]
internal int ins_h;
// Token: 0x04008473 RID: 33907
[FieldOffset(Offset = "0x74")]
[Token(Token = "0x4008473")]
internal int hash_size;
// Token: 0x04008474 RID: 33908
[FieldOffset(Offset = "0x78")]
[Token(Token = "0x4008474")]
internal int hash_bits;
// Token: 0x04008475 RID: 33909
[FieldOffset(Offset = "0x7C")]
[Token(Token = "0x4008475")]
internal int hash_mask;
// Token: 0x04008476 RID: 33910
[FieldOffset(Offset = "0x80")]
[Token(Token = "0x4008476")]
internal int hash_shift;
// Token: 0x04008477 RID: 33911
[FieldOffset(Offset = "0x84")]
[Token(Token = "0x4008477")]
internal int block_start;
// Token: 0x04008478 RID: 33912
[FieldOffset(Offset = "0x88")]
[Token(Token = "0x4008478")]
private DeflateManager.Config config;
// Token: 0x04008479 RID: 33913
[FieldOffset(Offset = "0x90")]
[Token(Token = "0x4008479")]
internal int match_length;
// Token: 0x0400847A RID: 33914
[FieldOffset(Offset = "0x94")]
[Token(Token = "0x400847A")]
internal int prev_match;
// Token: 0x0400847B RID: 33915
[FieldOffset(Offset = "0x98")]
[Token(Token = "0x400847B")]
internal int match_available;
// Token: 0x0400847C RID: 33916
[FieldOffset(Offset = "0x9C")]
[Token(Token = "0x400847C")]
internal int strstart;
// Token: 0x0400847D RID: 33917
[FieldOffset(Offset = "0xA0")]
[Token(Token = "0x400847D")]
internal int match_start;
// Token: 0x0400847E RID: 33918
[FieldOffset(Offset = "0xA4")]
[Token(Token = "0x400847E")]
internal int lookahead;
// Token: 0x0400847F RID: 33919
[FieldOffset(Offset = "0xA8")]
[Token(Token = "0x400847F")]
internal int prev_length;
// Token: 0x04008480 RID: 33920
[FieldOffset(Offset = "0xAC")]
[Token(Token = "0x4008480")]
internal CompressionLevel compressionLevel;
// Token: 0x04008481 RID: 33921
[FieldOffset(Offset = "0xB0")]
[Token(Token = "0x4008481")]
internal CompressionStrategy compressionStrategy;
// Token: 0x04008482 RID: 33922
[FieldOffset(Offset = "0xB8")]
[Token(Token = "0x4008482")]
internal short[] dyn_ltree;
// Token: 0x04008483 RID: 33923
[FieldOffset(Offset = "0xC0")]
[Token(Token = "0x4008483")]
internal short[] dyn_dtree;
// Token: 0x04008484 RID: 33924
[FieldOffset(Offset = "0xC8")]
[Token(Token = "0x4008484")]
internal short[] bl_tree;
// Token: 0x04008485 RID: 33925
[FieldOffset(Offset = "0xD0")]
[Token(Token = "0x4008485")]
internal ZTree treeLiterals;
// Token: 0x04008486 RID: 33926
[FieldOffset(Offset = "0xD8")]
[Token(Token = "0x4008486")]
internal ZTree treeDistances;
// Token: 0x04008487 RID: 33927
[FieldOffset(Offset = "0xE0")]
[Token(Token = "0x4008487")]
internal ZTree treeBitLengths;
// Token: 0x04008488 RID: 33928
[FieldOffset(Offset = "0xE8")]
[Token(Token = "0x4008488")]
internal short[] bl_count;
// Token: 0x04008489 RID: 33929
[FieldOffset(Offset = "0xF0")]
[Token(Token = "0x4008489")]
internal int[] heap;
// Token: 0x0400848A RID: 33930
[FieldOffset(Offset = "0xF8")]
[Token(Token = "0x400848A")]
internal int heap_len;
// Token: 0x0400848B RID: 33931
[FieldOffset(Offset = "0xFC")]
[Token(Token = "0x400848B")]
internal int heap_max;
// Token: 0x0400848C RID: 33932
[FieldOffset(Offset = "0x100")]
[Token(Token = "0x400848C")]
internal sbyte[] depth;
// Token: 0x0400848D RID: 33933
[FieldOffset(Offset = "0x108")]
[Token(Token = "0x400848D")]
internal int _lengthOffset;
// Token: 0x0400848E RID: 33934
[FieldOffset(Offset = "0x10C")]
[Token(Token = "0x400848E")]
internal int lit_bufsize;
// Token: 0x0400848F RID: 33935
[FieldOffset(Offset = "0x110")]
[Token(Token = "0x400848F")]
internal int last_lit;
// Token: 0x04008490 RID: 33936
[FieldOffset(Offset = "0x114")]
[Token(Token = "0x4008490")]
internal int _distanceOffset;
// Token: 0x04008491 RID: 33937
[FieldOffset(Offset = "0x118")]
[Token(Token = "0x4008491")]
internal int opt_len;
// Token: 0x04008492 RID: 33938
[FieldOffset(Offset = "0x11C")]
[Token(Token = "0x4008492")]
internal int static_len;
// Token: 0x04008493 RID: 33939
[FieldOffset(Offset = "0x120")]
[Token(Token = "0x4008493")]
internal int matches;
// Token: 0x04008494 RID: 33940
[FieldOffset(Offset = "0x124")]
[Token(Token = "0x4008494")]
internal int last_eob_len;
// Token: 0x04008495 RID: 33941
[FieldOffset(Offset = "0x128")]
[Token(Token = "0x4008495")]
internal short bi_buf;
// Token: 0x04008496 RID: 33942
[FieldOffset(Offset = "0x12C")]
[Token(Token = "0x4008496")]
internal int bi_valid;
// Token: 0x04008497 RID: 33943
[FieldOffset(Offset = "0x130")]
[Token(Token = "0x4008497")]
private bool Rfc1950BytesEmitted;
// Token: 0x04008498 RID: 33944
[FieldOffset(Offset = "0x131")]
[Token(Token = "0x4008498")]
private bool _WantRfc1950HeaderBytes;
// Token: 0x02002083 RID: 8323
[Token(Token = "0x2002083")]
internal sealed class CompressFunc : MulticastDelegate
{
// Token: 0x0600D11C RID: 53532 RVA: 0x002F99C0 File Offset: 0x002F7BC0
[Token(Token = "0x600D11C")]
[Address(RVA = "0x4AF020", Offset = "0x4AE020", VA = "0x1804AF020")]
public CompressFunc(object @object, IntPtr method)
{
this.method = method;
this.m_target = @object;
}
// Token: 0x0600D11D RID: 53533 RVA: 0x002F99DC File Offset: 0x002F7BDC
[Token(Token = "0x600D11D")]
[Address(RVA = "0x569240", Offset = "0x568240", VA = "0x180569240", 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: 0x0600D11E RID: 53534 RVA: 0x002F9A60 File Offset: 0x002F7C60
[Token(Token = "0x600D11E")]
[Address(RVA = "0x2404CA0", Offset = "0x2403CA0", VA = "0x182404CA0", Slot = "14")]
public IAsyncResult BeginInvoke(FlushType flush, AsyncCallback callback, object @object)
{
}
// Token: 0x0600D11F RID: 53535 RVA: 0x002F9A70 File Offset: 0x002F7C70
[Token(Token = "0x600D11F")]
[Address(RVA = "0x4AEA90", Offset = "0x4ADA90", VA = "0x1804AEA90", Slot = "15")]
public BlockState EndInvoke(IAsyncResult result)
{
throw new NullReferenceException();
}
}
// Token: 0x02002084 RID: 8324
[Token(Token = "0x2002084")]
internal class Config
{
// Token: 0x0600D120 RID: 53536 RVA: 0x002F9A84 File Offset: 0x002F7C84
[Token(Token = "0x600D120")]
[Address(RVA = "0x4E0F80", Offset = "0x4DFF80", VA = "0x1804E0F80")]
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: 0x0600D121 RID: 53537 RVA: 0x002F9ABC File Offset: 0x002F7CBC
[Token(Token = "0x600D121")]
[Address(RVA = "0x2404D20", Offset = "0x2403D20", VA = "0x182404D20")]
public static DeflateManager.Config Lookup(CompressionLevel level)
{
return DeflateManager.Config.Table[(int)level];
}
// Token: 0x0600D122 RID: 53538 RVA: 0x002F9ADC File Offset: 0x002F7CDC
[Token(Token = "0x600D122")]
[Address(RVA = "0x2404DB0", Offset = "0x2403DB0", VA = "0x182404DB0")]
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: 0x04008499 RID: 33945
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x4008499")]
internal int GoodLength;
// Token: 0x0400849A RID: 33946
[FieldOffset(Offset = "0x14")]
[Token(Token = "0x400849A")]
internal int MaxLazy;
// Token: 0x0400849B RID: 33947
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x400849B")]
internal int NiceLength;
// Token: 0x0400849C RID: 33948
[FieldOffset(Offset = "0x1C")]
[Token(Token = "0x400849C")]
internal int MaxChainLength;
// Token: 0x0400849D RID: 33949
[FieldOffset(Offset = "0x20")]
[Token(Token = "0x400849D")]
internal DeflateFlavor Flavor;
// Token: 0x0400849E RID: 33950
[Token(Token = "0x400849E")]
private static readonly DeflateManager.Config[] Table;
}
}
}