/// <summary> /// constructor with mode specified /// </summary> /// <param name="mode">indicates which mode are used</param> public Decompressor(SlidingWindowSize mode) { this.mode = mode; if (mode == SlidingWindowSize.EightKB) { historyBuffer = new SlidingWindow(window8k); } else if (mode == SlidingWindowSize.SixtyFourKB) { historyBuffer = new SlidingWindow(window64k); } else { throw new ArgumentException( "mode should be EightKB or SixtyFourKB", "mode"); } decodeState = DecodeState.Init; }
/// <summary> /// constructor with specified sliding window size /// </summary> /// <param name="mode">the mode of compressor, specify the size of sliding window</param> public Compressor(SlidingWindowSize mode) { this.mode = mode; if (mode == SlidingWindowSize.EightKB) { slidingWindow = new SlidingWindow(window8k); } else if (mode == SlidingWindowSize.SixtyFourKB) { slidingWindow = new SlidingWindow(window64k); } else { throw new ArgumentException( "mode should be EightKB or SixtyFourKB", "mode"); } hashTable = new HashTable(slidingWindow); }
/// <summary> /// constructor with specified sliding window size /// </summary> /// <param name="mode">the mode of compressor, specify the size of sliding window</param> public Compressor(SlidingWindowSize mode) { this.mode = mode; if (mode == SlidingWindowSize.EightKB) { slidingWindow = new SlidingWindow(window8k); } else if (mode == SlidingWindowSize.SixtyFourKB) { slidingWindow = new SlidingWindow(window64k); } else { throw new ArgumentException( "mode should be EightKB or SixtyFourKB", "mode"); } hashTable = new HashTable(slidingWindow); }
/// <summary> /// constructor with mode specified /// </summary> /// <param name="mode">indicates which mode are used</param> public Decompressor(SlidingWindowSize mode) { this.mode = mode; if (mode == SlidingWindowSize.EightKB) { historyBuffer = new SlidingWindow(window8k); } else if (mode == SlidingWindowSize.SixtyFourKB) { historyBuffer = new SlidingWindow(window64k); } else { throw new ArgumentException( "mode should be EightKB or SixtyFourKB", "mode"); } decodeState = DecodeState.Init; }