public GZipper(string sourceFileName, string destinationFileName, WorkMode mode, bool needProcessInfo = false) : base(sourceFileName, destinationFileName, needProcessInfo) { lastWritedBlockId = 0; this.mode = mode; this.modeMessage = mode.ToString(); if (mode == WorkMode.Compress) { this.reader = new CompressReader(sourceFileName, blockSize); work = CompressWork; write = CompressWrite; } else if (mode == WorkMode.Decompress) { this.reader = new DecompressReader(sourceFileName, blockSize); work = DecompressWork; write = DecompressWrite; } else { throw new InvalidOperationException("Unknown work mode"); } }
public void SetWorkMode(WorkMode newWorkMode) { workMode = newWorkMode.ToString("G"); }
public void SetCurrentWorkMode(WorkMode newMode) { Logger.V(">> AppManager.SetCurrentWorkMode(@1:" + newMode.ToString() + ")"); m_currWorkMode = newMode; Logger.V("<< AppManager.SetCurrentWorkMode(@1:" + newMode.ToString() + ")"); }