public void Export(Stream stream)
 {
     using (JpkBinaryWriter writer = new JpkBinaryWriter(EndianBitConverter.Little, stream))
     {
         writer.Write(this.Data);
     }
 }
Esempio n. 2
0
        public void Write(Stream stream)
        {
            using (JpkBinaryWriter writer = new JpkBinaryWriter(EndianBitConverter.Little, stream))
            {
                writer.Write(1262571594); // JPAK
                writer.Write(new byte[4]);
                writer.Write(this.Entries.Count);
                writer.Write(this.Alignment);
                writer.Write(new byte[4]);
                writer.Write(this.Entries.Count * 32 + 32);
                writer.Write(new byte[8]);

                int nameOffset = this.UpdateOffsets();
                foreach (JpkEntry entry in this.Entries)
                {
                    entry.Write(writer);
                }

                writer.Write(new byte());
                foreach (JpkEntry entry in this.Entries)
                {
                    writer.Write(entry.Name);
                }
                writer.Write(new byte[(-nameOffset) & (this.Alignment - 1)]);

                foreach (JpkEntry entry in this.Entries)
                {
                    writer.Write(entry.Data);
                    writer.Write(new byte[(-entry.Size) & (this.Alignment - 1)]);
                }
            }
        }
Esempio n. 3
0
 public void Export(Stream stream)
 {
     using (JpkBinaryWriter writer = new JpkBinaryWriter(EndianBitConverter.Little, stream))
     {
         writer.Write(this.Data);
     }
 }
Esempio n. 4
0
 public void Write(JpkBinaryWriter writer)
 {
     writer.Write(this._nameOffset);
     writer.Write(this.Size);
     writer.Write(this._fileOffset);
     writer.Write(this.Size);
     writer.Write(new byte[16]);
 }
 public void Write(JpkBinaryWriter writer)
 {
     writer.Write(this._nameOffset);
     writer.Write(this.Size);
     writer.Write(this._fileOffset);
     writer.Write(this.Size);
     writer.Write(new byte[16]);
 }
        public void Write(Stream stream)
        {
            using (JpkBinaryWriter writer = new JpkBinaryWriter(EndianBitConverter.Little, stream))
            {
                writer.Write(1262571594); // JPAK
                writer.Write(new byte[4]);
                writer.Write(this.Entries.Count);
                writer.Write(this.Alignment);
                writer.Write(new byte[4]);
                writer.Write(this.Entries.Count * 32 + 32);
                writer.Write(new byte[8]);

                int nameOffset = this.UpdateOffsets();
                foreach (JpkEntry entry in this.Entries)
                {
                    entry.Write(writer);
                }

                writer.Write(new byte());
                foreach (JpkEntry entry in this.Entries)
                {
                    writer.Write(entry.Name);
                }
                writer.Write(new byte[(-nameOffset) & (this.Alignment - 1)]);

                foreach (JpkEntry entry in this.Entries)
                {
                    writer.Write(entry.Data);
                    writer.Write(new byte[(-entry.Size) & (this.Alignment - 1)]);
                }
            }
        }