LZW算法的 C#实现

作者:袖梨 2022-07-02
#undef debug
#define debugdisplay
#undef debugdictionary
using System;
using System.Collections;
namespace LZW
{
 public class cLZW
 {
    #region Constrcut
    public cLZW()
    {
    }
    #endregion
    
    #region Coding
    public string InCharStream
    {
     set { _InCharStream = value; }
     get {return _InCharStream; }
    }
    public ArrayList CodingCodeStream
    {
     get {return _CodingCodeStream;}
    }
    public ArrayList CodingDictionary
    {
     get {return _CodingDictionary;}
    }
    private void InitCodingDictionary()
    {
     _CodingDictionary.Clear();
#if debug
     _CodingDictionary.Add("A");
     _CodingDictionary.Add("B");
     _CodingDictionary.Add("C");
#else
     for(int i = 0; i < 256; i++)
     {
    _CodingDictionary.Add((char)i);

相关文章

精彩推荐