예제 #1
0
        private IArchiveInfo ReadFromSubStream(ArchiveReadStream MainStream, Type SubType)
        {
            var SubStream  = MainStream.ReadStream();
            var SubEncoder = new ArchiveDecoder(SubStream);

            SubEncoder.Flush();
            var SubInfo = Activator.CreateInstance(SubType) as IArchiveInfo;

            SubInfo.Decode(SubEncoder);
            return(SubInfo);
        }
예제 #2
0
        public bool Load()
        {
            try
            {
                if (!ReadStream_.Load(ArchivePath_))
                {
                    return(false);
                }
                if (!CheckArchiveCrc())
                {
                    return(false);
                }

                Decoder_.Flush();
                return(true);
            }
            catch (Exception Ex)
            {
                LLogger.LError(Ex.Message);
                return(false);
            }
        }