下载此文档

CRC校验实验报告.doc


文档分类:行业资料 | 页数:约8页 举报非法文档有奖
1/8
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/8 下载此文档
文档列表 文档介绍
实验三CRC校验
一、CRC校验码的基本源理
编码过程:
CRC校验码的编码方法是用待发送的二进制数据t(x)除以生成多项式g(x),将最后的余数作为CRC校验码。
其实现步骤以下:
1设待发送的数据块是mtes(str);returnByteToHex(bTemp,);
}
///<summary>
.
16进制转字符串
</summary>
<paramname="str">16进制</param>
<returns></returns>
publicstaticstringHexToStr(stringstr)
{
byte[]bytes=newbyte[];
bytes=HexToByte(str);
(bytes);
}
}
}
namespaceCRC
{
//哈夫曼树150
结点类Node的定义以下:
publicclassNode
{
privateintweight;//结点权值
privateintlChild;//左孩子结点
privateintrChild;//右孩子结点
privateintparent;//父结点
//结点权值属性
publicintWeight
{
get
{
returnweight;
}
set
{
weight=value;
}
}
//左孩子结点属性
publicintLChild
.
{
get
{
returnlChild;
}
set
{
lChild=value;
}
}
//右孩子结点属性
publicintRChild
{
get
{returnrChild;}
set{rChild=value;}}
//父结点属性
publicintParent
{get
{returnparent;}
set{
parent=value;}}
//结构器
publicNode()
{
weight=0;lChild=-1;
rChild=-1;parent=-1;}
//结构器
publicNode(intw,intlc,intrc,intp)
{
weight=w;
lChild=lc;
rChild=rc;
parent=p;
}
}
publicclassHuffmanTree
.
{
privateList<Node>data=newList<Node>();//结点数组privateintleafNum;//叶子结点数量
//索引器
publicNodethis[intindex]
{

CRC校验实验报告 来自淘豆网m.daumloan.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息