terraria-cpp2il-methodrecon v1.4.4.9
Terraria mobile dump, with reconstructed method body. Dump with CallAnalysis: https://infinitynichto.github.io/terraria-cpp2il
Loading...
Searching...
No Matches
BZip2OutputStream.cs
Go to the documentation of this file.
1using System;
3using System.IO;
6
7namespace Ionic.BZip2
8{
9 // Token: 0x0200003B RID: 59
11 {
12 // Token: 0x060002F6 RID: 758 RVA: 0x0000A9F8 File Offset: 0x00008BF8
14 {
15 if (!true)
16 {
17 }
18 }
19
20 // Token: 0x060002F7 RID: 759 RVA: 0x0000AA08 File Offset: 0x00008C08
22 {
23 }
24
25 // Token: 0x060002F8 RID: 760 RVA: 0x0000AA18 File Offset: 0x00008C18
27 {
28 if (!true)
29 {
30 }
31 }
32
33 // Token: 0x060002F9 RID: 761 RVA: 0x0000AA28 File Offset: 0x00008C28
35 {
37 if (3 == 0)
38 {
39 }
40 base..ctor();
41 if (3 == 0)
42 {
43 }
45 Stream stream = this.output;
47 this.EmitHeader();
48 }
49
50 // Token: 0x060002FA RID: 762 RVA: 0x0000AA64 File Offset: 0x00008C64
51 public override void Close()
52 {
53 if (this.output != null)
54 {
55 this.Finish();
56 if (!this.leaveOpen)
57 {
58 return;
59 }
60 }
61 }
62
63 // Token: 0x060002FB RID: 763 RVA: 0x0000AA88 File Offset: 0x00008C88
64 public override void Flush()
65 {
66 if (this.output != null)
67 {
68 BitWriter bitWriter = this.bw;
69 long num = 0L;
70 long num2 = 0L;
71 bitWriter.WriteBits((int)num, (uint)num2);
72 Stream stream = this.output;
73 return;
74 }
75 }
76
77 // Token: 0x060002FC RID: 764 RVA: 0x0000AAB8 File Offset: 0x00008CB8
78 private void EmitHeader()
79 {
80 int num = this.blockSize100k;
81 Stream stream = this.output;
82 }
83
84 // Token: 0x060002FD RID: 765 RVA: 0x0000AAD8 File Offset: 0x00008CD8
85 private void EmitTrailer()
86 {
87 this.bw.WriteBits(8, (uint)23);
88 this.bw.WriteBits(8, (uint)114);
89 this.bw.WriteBits(8, (uint)69);
90 this.bw.WriteBits(8, (uint)56);
91 this.bw.WriteBits(8, (uint)80);
92 this.bw.WriteBits(8, (uint)144);
93 BitWriter bitWriter = this.bw;
94 uint num = this.combinedCRC;
95 bitWriter.WriteInt(num);
96 this.bw.FinishAndPad();
97 }
98
99 // Token: 0x060002FE RID: 766 RVA: 0x0000AB64 File Offset: 0x00008D64
100 private void Finish()
101 {
104 uint num = this.combinedCRC;
105 uint <Crc32>k__BackingField = bzip2Compressor.<Crc32>k__BackingField;
106 this.combinedCRC = <Crc32>k__BackingField;
107 this.EmitTrailer();
108 }
109
110 // Token: 0x170000C4 RID: 196
111 // (get) Token: 0x060002FF RID: 767 RVA: 0x0000ABAC File Offset: 0x00008DAC
112 public int BlockSize
113 {
114 get
115 {
116 return this.blockSize100k;
117 }
118 }
119
120 // Token: 0x06000300 RID: 768 RVA: 0x0000ABC0 File Offset: 0x00008DC0
121 public override void Write(byte[] buffer, int offset, int count)
122 {
123 while (this.output == null)
124 {
125 }
126 if (count != 0)
127 {
128 int num = this.compressor.Fill(buffer, offset, count);
131 uint num2 = this.combinedCRC;
132 uint <Crc32>k__BackingField = bzip2Compressor.<Crc32>k__BackingField;
133 this.combinedCRC = <Crc32>k__BackingField;
134 int num3 = this.totalBytesWrittenIn;
136 }
137 }
138
139 // Token: 0x170000C5 RID: 197
140 // (get) Token: 0x06000301 RID: 769 RVA: 0x0000AC20 File Offset: 0x00008E20
141 public override bool CanRead
142 {
143 get
144 {
145 }
146 }
147
148 // Token: 0x170000C6 RID: 198
149 // (get) Token: 0x06000302 RID: 770 RVA: 0x0000AC30 File Offset: 0x00008E30
150 public override bool CanSeek
151 {
152 get
153 {
154 }
155 }
156
157 // Token: 0x170000C7 RID: 199
158 // (get) Token: 0x06000303 RID: 771 RVA: 0x0000AC40 File Offset: 0x00008E40
159 public override bool CanWrite
160 {
161 get
162 {
163 /*
164An exception occurred when decompiling this method (06000303)
165
166ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Ionic.BZip2.BZip2OutputStream::get_CanWrite()
167
168 ---> System.Exception: Basic block has to end with unconditional control flow.
169{
170 IL_0000:
171 brtrue(IL_0000, logicnot:bool(ldfld:Stream[exp:bool](BZip2OutputStream::output, ldloc:BZip2OutputStream(this))))
172}
173
174 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
175 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
176 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
177 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
178 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
179 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
180 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
181 --- End of inner exception stack trace ---
182 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
183 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1683
184*/;
185 }
186 }
187
188 // Token: 0x170000C8 RID: 200
189 // (get) Token: 0x06000304 RID: 772 RVA: 0x00002122 File Offset: 0x00000322
190 public override long Length
191 {
192 get
193 {
194 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
195 }
196 }
197
198 // Token: 0x170000C9 RID: 201
199 // (get) Token: 0x06000305 RID: 773 RVA: 0x00002122 File Offset: 0x00000322
200 // (set) Token: 0x06000306 RID: 774 RVA: 0x00002122 File Offset: 0x00000322
201 public override long Position
202 {
203 get
204 {
205 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
206 }
207 set
208 {
209 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
210 }
211 }
212
213 // Token: 0x06000307 RID: 775 RVA: 0x00002122 File Offset: 0x00000322
214 public override long Seek(long offset, SeekOrigin origin)
215 {
216 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
217 }
218
219 // Token: 0x06000308 RID: 776 RVA: 0x00002122 File Offset: 0x00000322
220 public override void SetLength(long value)
221 {
222 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
223 }
224
225 // Token: 0x06000309 RID: 777 RVA: 0x00002122 File Offset: 0x00000322
226 public override int Read(byte[] buffer, int offset, int count)
227 {
228 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
229 }
230
231 // Token: 0x0600030A RID: 778 RVA: 0x0000AC54 File Offset: 0x00008E54
232 [Conditional("Trace")]
239
240 // Token: 0x040001C5 RID: 453
242
243 // Token: 0x040001C6 RID: 454
244 private bool leaveOpen;
245
246 // Token: 0x040001C7 RID: 455
248
249 // Token: 0x040001C8 RID: 456
250 private uint combinedCRC;
251
252 // Token: 0x040001C9 RID: 457
253 private Stream output;
254
255 // Token: 0x040001CA RID: 458
256 private BitWriter bw;
257
258 // Token: 0x040001CB RID: 459
259 private int blockSize100k;
260
261 // Token: 0x040001CC RID: 460
263
264 // Token: 0x0200003C RID: 60
265 [Flags]
266 private enum TraceBits : uint
267 {
268 // Token: 0x040001CE RID: 462
269 None = 0U,
270 // Token: 0x040001CF RID: 463
271 Crc = 1U,
272 // Token: 0x040001D0 RID: 464
273 Write = 2U,
274 // Token: 0x040001D1 RID: 465
275 All = 4294967295U
276 }
277 }
278}
class f__AnonymousType0<< Count > j__TPar
int Fill(byte[] buffer, int offset, int count)
BZip2OutputStream(Stream output, int blockSize, bool leaveOpen)
BZip2OutputStream(Stream output, bool leaveOpen)
BZip2OutputStream(Stream output, int blockSize)
override int Read(byte[] buffer, int offset, int count)
BZip2OutputStream.TraceBits desiredTrace
void TraceOutput(BZip2OutputStream.TraceBits bits, string format, params object[] varParams)
override long Seek(long offset, SeekOrigin origin)
override void SetLength(long value)
override void Write(byte[] buffer, int offset, int count)
void WriteBits(int nbits, uint value)
Definition BitWriter.cs:71
void WriteInt(uint u)
Definition BitWriter.cs:87
static void WriteLine(object value)
Definition Console.cs:134
static Thread CurrentThread
Definition Thread.cs:381