예제 #1
0
 // Initalize Packer
 private void InitalizePacker()
 {
     // Get archive creator based on compression format
     if (Dictionary.ContainsKey(Format) && Dictionary[Format].CanPack)
     {
         Packer = Dictionary[Format];
         Name   = Packer.Name;
     }
 }
예제 #2
0
        // Initalize Decoder
        private void InitalizeExtractor()
        {
            foreach (KeyValuePair<ArchiveFormat, ArchiveModule> value in Dictionary)
            {
                if (value.Value.Check(ref Data, Filename))
                {
                    // This is the archive format
                    if (value.Value.CanExtract)
                    {
                        Format    = value.Key;
                        Extractor = value.Value;
                        Name      = Extractor.Name;
                        Extension = Extractor.Extension;
                        Translate = Extractor.Translate;
                    }

                    break;
                }
            }
        }