Beispiel #1
0
 public IndexReader(ArcView file, INekoFormat enc, byte[] index, int index_size)
 {
     m_input      = new BinMemoryStream(index, 0, index_size, file.Name);
     m_index_size = index_size;
     m_max_offset = file.MaxOffset;
     m_format     = enc;
 }
Beispiel #2
0
        static byte[] ReadBlock(ArcView.Frame view, INekoFormat enc, long offset, out int length)
        {
            uint hash = view.ReadUInt32(offset);

            length = view.ReadInt32(offset + 4);

            int aligned_size = (length + 7) & ~7;

            byte[] buffer = new byte[aligned_size];
            length = view.Read(offset + 8, buffer, 0, (uint)length);
            if (0 != hash)
            {
                enc.Decrypt(hash, buffer, 0, aligned_size);
            }
            return(buffer);
        }
Beispiel #3
0
 public NekoArchive(ArcView arc, ArchiveFormat impl, ICollection <Entry> dir, INekoFormat decoder)
     : base(arc, impl, dir)
 {
     Decoder = decoder;
 }