Example #1
0
        private void decompressARC()
        {
            fs      = new FileStream(arcFileName, FileMode.Open, FileAccess.Read);
            header  = getHeader(fs);
            parts   = getFileParts(fs);
            strings = getStrings(fs);
            tocs    = getFileToCs(fs);

            // May have gotten less files than the header indicated
            header.num_files = tocs.Length;

            if (!lazyInitialize)
            {
                extractFiles(fs);
            }
        }
Example #2
0
        private ARCHeader getHeader(byte[] bytes)
        {
            ARCHeader header = new ARCHeader();

            header.unknown    = IOHelper.GetInt(bytes, 0);
            header.version    = IOHelper.GetInt(bytes, 4);
            header.num_files  = IOHelper.GetInt(bytes, 8);
            header.rec_num    = IOHelper.GetInt(bytes, 12);
            header.rec_size   = IOHelper.GetInt(bytes, 16);
            header.str_size   = IOHelper.GetInt(bytes, 20);
            header.rec_offset = IOHelper.GetInt(bytes, 24);

            if (header.version != 3)
            {
                logger.WarnFormat("Header version {0} is not supported.", header.version);
                return(null);
            }

            return(header);
        }
Example #3
0
        private ARCHeader getHeader(FileStream fs)
        {
            ARCHeader header = new ARCHeader();


            header.unknown    = IOHelper.ReadInteger(fs);
            header.version    = IOHelper.ReadInteger(fs);
            header.num_files  = IOHelper.ReadInteger(fs);
            header.rec_num    = IOHelper.ReadInteger(fs);
            header.rec_size   = IOHelper.ReadInteger(fs);
            header.str_size   = IOHelper.ReadInteger(fs);
            header.rec_offset = IOHelper.ReadInteger(fs);

            if (header.version != 3)
            {
                logger.WarnFormat("Header version {0} is not supported.", header.version);
                return(null);
            }

            return(header);
        }