public ArchiveWorker(string path) { _path = MakiExtended.GetUnixFullPath(path); string root = Path.GetDirectoryName(_path); string file = Path.GetFileNameWithoutExtension(_path); string fi = MakiExtended.GetUnixFullPath($"{Path.Combine(root, file)}{Memory.Archives.B_FileIndex}"); string fl = MakiExtended.GetUnixFullPath($"{Path.Combine(root, file)}{Memory.Archives.B_FileList}"); if (!File.Exists(fi)) { throw new Exception($"There is no {file}.fi file!\nExiting..."); } if (!File.Exists(fl)) { throw new Exception($"There is no {file}.fl file!\nExiting..."); } FileList = ProduceFileLists(); }
public static byte[] GetBinaryFile(string archiveName, string fileName) { byte[] isComp = GetBin(MakiExtended.GetUnixFullPath(archiveName), fileName); return(isComp == null ? null : _compressed?LZSS.DecompressAll(isComp, (uint)isComp.Length, (int)_unpackedFileSize) : isComp); }