private void method_1() { Class889 class889 = Class889.Create(this.stream_0, this.dxfVersion_0, this.encoding_0); this.class564_0.Header2Offset = (ulong)this.stream_0.Position; MemoryStream fileHeaderDataStream = new MemoryStream(); this.method_2(fileHeaderDataStream); this.stream_0.Write(fileHeaderDataStream.GetBuffer(), 0, (int)fileHeaderDataStream.Length); this.stream_0.Position = 0L; this.stream_0.Write(Encodings.Ascii.GetBytes(this.dxfModel_0.Header.AcadVersionString), 0, 6); this.stream_0.Write(new byte[5], 0, 5); if (this.dxfModel_0.Header.AcadVersion == DxfVersion.Dxf18 && this.dxfModel_0.Header.AcadMaintenanceVersion == 1) { throw new DxfException("Header.AcadMaintenanceVersion may not be 1 for R18 files."); } this.stream_0.WriteByte((byte)this.dxfModel_0.Header.AcadMaintenanceVersion); this.stream_0.WriteByte((byte)3); class889.vmethod_11((uint)this.class617_5.Pages[0].StreamOffset + 32U); this.stream_0.WriteByte((byte)Class885.smethod_3(DxfVersion.Dxf27)); this.stream_0.WriteByte((byte)8); ushort num = Class952.smethod_1(this.dxfModel_0.Header.DrawingCodePage); class889.vmethod_7(num); this.stream_0.Write(new byte[3], 0, 3); class889.vmethod_9((int)this.dxfModel_0.SecurityFlags); class889.vmethod_9(0); class889.vmethod_11((uint)this.class617_1.Pages[0].StreamOffset + 32U); class889.vmethod_11(0U); class889.vmethod_9(128); class889.vmethod_11((uint)this.class617_6.Pages[0].StreamOffset + 32U); this.stream_0.Write(new byte[80], 0, 80); this.stream_0.Write(fileHeaderDataStream.GetBuffer(), 0, (int)fileHeaderDataStream.Length); this.stream_0.Write(Class998.byte_0, 236, 20); }
private void method_2() { Class889 class889 = Class889.Create(this.stream_0, this.dxfVersion_0, this.encoding_0); this.stream_0.Position = 0L; this.stream_0.Write(Encodings.Ascii.GetBytes(this.dxfModel_0.Header.AcadVersionString), 0, 6); this.stream_0.Write(new byte[5], 0, 5); int maintenanceVersion = this.dxfModel_0.Header.AcadMaintenanceVersion; this.stream_0.WriteByte((byte)this.dxfModel_0.Header.AcadMaintenanceVersion); this.stream_0.WriteByte((byte)3); class889.vmethod_11((uint)this.class504_2.Pages[0].StreamOffset + 1152U); this.stream_0.WriteByte((byte)Class885.smethod_3(DxfVersion.Dxf27)); this.stream_0.WriteByte((byte)8); ushort num = Class952.smethod_1(this.dxfModel_0.Header.DrawingCodePage); class889.vmethod_7(num); this.stream_0.Write(new byte[3], 0, 3); class889.vmethod_9((int)this.dxfModel_0.SecurityFlags); class889.vmethod_9(0); class889.vmethod_11((uint)this.class504_3.Pages[0].StreamOffset + 1152U); class889.vmethod_11(0U); class889.vmethod_9(128); class889.vmethod_11((uint)this.class504_1.Pages[0].StreamOffset + 1152U); for (int index = 0; index < 80; ++index) { this.stream_0.WriteByte((byte)0); } }
private void method_10() { this.class617_6.MaxDecompressedPageSize = 128; MemoryStream memoryStream = new MemoryStream(); Class885.smethod_0(new Class949(), (Stream)memoryStream, this.encoding_0); this.method_23(this.class617_6, memoryStream, false); }
protected void method_23(Class617 section, MemoryStream memoryStream, bool compress) { section.SectionSize = (ulong)memoryStream.Length; section.Compressed = compress ? 2 : 1; int decompressedPageSize = section.MaxDecompressedPageSize; int num1 = (int)(memoryStream.Length / (long)decompressedPageSize); byte[] buffer = memoryStream.GetBuffer(); ulong num2 = 0; for (int index = 0; index < num1; ++index) { this.method_24(section, 1097008187, decompressedPageSize, buffer, num2, decompressedPageSize, compress); num2 += (ulong)decompressedPageSize; } int uncompressedLength = (int)(memoryStream.Length % (long)decompressedPageSize); if (uncompressedLength <= 0 || Class885.smethod_1(buffer, num2, (ulong)uncompressedLength)) { return; } this.method_24(section, 1097008187, decompressedPageSize, buffer, num2, uncompressedLength, compress); int num3 = num1 + 1; }
public void Write() { Interface29 nterface29 = Class724.Create(this.dxfVersion_0, (Stream)this.memoryStream_0, this.encoding_0); nterface29.imethod_11(byte.MaxValue); nterface29.imethod_11((byte)119); nterface29.imethod_11((byte)1); DwgVersion dwgVersion = Class885.smethod_3(this.dxfModel_0.Header.AcadVersion); nterface29.imethod_18((short)dwgVersion); nterface29.imethod_18((short)this.dxfModel_0.Header.AcadMaintenanceVersion); nterface29.imethod_19(this.dxfModel_0.NumberOfSaves); nterface29.imethod_19(-1); short num1 = this.dxfModel_0.NumberOfSaves <= (int)short.MaxValue ? (short)0 : (short)(this.dxfModel_0.NumberOfSaves - (int)short.MaxValue); short num2 = (short)(this.dxfModel_0.NumberOfSaves - (int)num1); nterface29.imethod_18(num2); nterface29.imethod_18(num1); nterface29.imethod_19(0); nterface29.imethod_18((short)dwgVersion); nterface29.imethod_18((short)this.dxfModel_0.Header.AcadMaintenanceVersion); nterface29.imethod_18((short)dwgVersion); nterface29.imethod_18((short)this.dxfModel_0.Header.AcadMaintenanceVersion); nterface29.imethod_18((short)5); nterface29.imethod_18((short)2195); nterface29.imethod_18((short)5); nterface29.imethod_18((short)2195); nterface29.imethod_18((short)0); nterface29.imethod_18((short)1); nterface29.imethod_19(0); nterface29.imethod_19(0); nterface29.imethod_19(0); nterface29.imethod_19(0); nterface29.imethod_19(0); int days1; int milliseconds1; Class644.smethod_1(this.dxfModel_0.Header.CreateDateTime, out days1, out milliseconds1); nterface29.imethod_19(days1); nterface29.imethod_19(milliseconds1); int days2; int milliseconds2; Class644.smethod_1(this.dxfModel_0.Header.UpdateDateTime, out days2, out milliseconds2); nterface29.imethod_19(days2); nterface29.imethod_19(milliseconds2); int num3 = -1; if (this.dxfModel_0.Header.HandleSeed <= (ulong)int.MaxValue) { num3 = (int)this.dxfModel_0.Header.HandleSeed; } nterface29.imethod_19(num3); nterface29.imethod_19(0); nterface29.imethod_18((short)0); nterface29.imethod_18((short)((int)num2 - (int)num1)); nterface29.imethod_19(0); nterface29.imethod_19(0); nterface29.imethod_19(0); nterface29.imethod_19(this.dxfModel_0.NumberOfSaves); nterface29.imethod_19(0); nterface29.imethod_19(0); nterface29.imethod_19(0); nterface29.imethod_19(0); }
private void method_9() { Class889.Create((Stream)this.class504_1.Stream, this.dxfVersion_0, this.encoding_0); Class885.smethod_0(new Class949(), (Stream)this.class504_1.Stream, this.encoding_0); }