当前位置:编程学习 > C#/ASP.NET >>

LZW算法的 C#实现

#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);
补充:asp.net教程,C语言
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,