Example #1
0
        public ArchiveCodec(string ArchivePath)
        {
            ArchivePath_ = ArchivePath;

            ReadStream_  = new ArchiveReadStream();
            Decoder_     = new ArchiveDecoder(ReadStream_);
            WriteStream_ = new ArchiveWriteStream();
            Encoder_     = new ArchiveEncoder(WriteStream_);
            WriteArchiveCrcConst();
        }
Example #2
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);
        }