// 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; } }
// 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; } } }