Ejemplo n.º 1
0
 private void ReadHeader(KOARBinaryReader br)
 {
     byte[] signature = br.Read(4);
     if (!signature.SequenceEqual(Big.SIGNATURE))
     {
         throw new IOException("big file signature doesn't match");
     }
     _version = br.ReadUInt();
     br.Read();     // 1
     BuildString = br.ReadString();
     br.ReadUInt(); // 0x20
 }
Ejemplo n.º 2
0
        public override byte[] GetBytes()
        {
            KOARBinaryReader br = GetBinaryReaderUncompressed();

            byte[] result = br.Read((int)_size);
            br.Close();
            return(result);
        }
Ejemplo n.º 3
0
        private void ReadAdditionalInfo()
        {
            // load names
            var lookup_names = this.Find(0xffffffff); // .\lookup_names_as_strings.bin

            if (lookup_names != null)
            {
                List <String> names = new List <string>();

                //var br = lookup_names.GetBinaryReader();
                var br = new KOARBinaryReader(lookup_names.GetStream());

                int count = br.ReadInt();
                br.ReadInt(); // skip count duplicate
                br.Read(3);   // skip ffff00

                for (int i = 0; i < count; i++)
                {
                    _fileTable[i].Filename = br.ReadString();
                }

                br.Close();
            }
        }