Beispiel #1
0
                public static void Write(BinaryWriterEx bw, File file, int index, byte format)
                {
                    bw.WriteByte(file.Flags);
                    bw.WriteByte(0);
                    bw.WriteByte(0);
                    bw.WriteByte(0);

                    bw.WriteInt32(-1);
                    bw.ReserveInt64($"FileSize{index}");
                    if (format == 0x2E || format == 0x3E || format == 0x74)
                    {
                        bw.WriteInt64(file.Bytes.LongLength);
                    }

                    if (format == 0x3E)
                    {
                        bw.ReserveUInt64($"FileOffset{index}");
                    }
                    else
                    {
                        bw.ReserveUInt32($"FileOffset{index}");
                    }

                    if (format == 0x2E || format == 0x3E || format == 0x74)
                    {
                        bw.WriteInt32(file.ID);
                    }

                    bw.ReserveInt32($"FileName{index}");
                }