Exemplo n.º 1
0
        public void Write(Stream stream)
        {
            using var writer = new ErpBinaryWriter(EndianBitConverter.Little, stream);
            var numTempFiles = UpdateOffsets();

            writer.Write(1263555141);

            writer.Write(Version);
            writer.Write(0L);
            writer.Write(48L);
            writer.Write(_resourceInfoTotalLength);

            writer.Write(ResourceOffset);
            writer.Write(0L);

            writer.Write(Resources.Count);
            writer.Write(numTempFiles);

            foreach (var entry in Resources)
            {
                entry.Write(writer);
            }

            foreach (var entry in Resources)
            {
                foreach (var frag in entry.Fragments)
                {
                    //writer.Write((UInt16)0xDA78);
                    writer.Write(frag.GetDataArray(false));
                }
            }
        }
Exemplo n.º 2
0
        public void Write(Stream stream)
        {
            using (ErpBinaryWriter writer = new ErpBinaryWriter(EndianBitConverter.Little, stream))
            {
                Int32 numTempFiles = this.UpdateOffsets();

                writer.Write(1263555141);

                writer.Write(this.Version);
                writer.Write((Int64)0);
                writer.Write((Int64)48);
                writer.Write(this._resourceInfoTotalLength);

                writer.Write(this.ResourceOffset);
                writer.Write((Int64)0);

                writer.Write(this.Resources.Count);
                writer.Write(numTempFiles);

                foreach (ErpResource entry in this.Resources)
                {
                    entry.Write(writer);
                }

                foreach (ErpResource entry in this.Resources)
                {
                    foreach (ErpFragment res in entry.Fragments)
                    {
                        //writer.Write((UInt16)0xDA78);
                        writer.Write(res._data);
                    }
                }
            }
        }
Exemplo n.º 3
0
 public void Export(Stream stream)
 {
     using (ErpBinaryWriter writer = new ErpBinaryWriter(EndianBitConverter.Little, stream))
     {
         writer.Write(this.GetDataArray(true));
     }
 }
Exemplo n.º 4
0
        public void Write(ErpBinaryWriter writer)
        {
            writer.Write(this.Name, 4);

            writer.Write(this.Offset);
            writer.Write(this.Size);
            writer.Write(this.Flags);

            if (this.ParentFile.Version > 2)
            {
                writer.Write((byte)this.Compression);
                writer.Write(this.PackedSize);
            }
        }
Exemplo n.º 5
0
        public void Write(ErpBinaryWriter writer)
        {
            writer.Write(Name, 4);

            writer.Write(Offset);
            writer.Write(Size);
            writer.Write(Flags);

            if (ParentFile.Version > 2)
            {
                writer.Write((byte)Compression);
                writer.Write(PackedSize);
            }
        }
Exemplo n.º 6
0
        public void Write(ErpBinaryWriter writer)
        {
            writer.Write(this._resourceInfoLength);
            writer.Write((Int16)(this.Identifier.Length + 1));
            writer.Write(this.Identifier);
            writer.Write(this.ResourceType, 16);
            writer.Write(this.Unknown);
            writer.Write((byte)this.Fragments.Count);

            foreach (ErpFragment res in this.Fragments)
            {
                res.Write(writer);
            }

            if (this.ParentFile.Version > 2)
            {
                writer.Write(this.Hash);
            }
        }