登录
首页 » 数据结构 » 假设一个文件中出现了8种符号S0,SQ,S2,S3,S4,S5,S6,S7,那么每种符号要编码,至少需要3bit。假设编码成000,001, 010,011,1...

假设一个文件中出现了8种符号S0,SQ,S2,S3,S4,S5,S6,S7,那么每种符号要编码,至少需要3bit。假设编码成000,001, 010,011,1...

于 2022-04-27 发布 文件大小:227.36 kB
0 192
下载积分: 2 下载次数: 1

代码说明:

假设一个文件中出现了8种符号S0,SQ,S2,S3,S4,S5,S6,S7,那么每种符号要编码,至少需要3bit。假设编码成000,001, 010,011,100,101,110,111。那么符号序列S0S1S7S0S1S6S2S2S3S4S5S0S0S1编码后变成 000001111000001110010010011100101000000001,共用了42bit。我们发现S0,S1,S2这3个符号出现的频率比较大,其它符号出现的频率比较小,我们采用这样的编码方案:S0到S7的码辽分别01,11,101,0000,0001,0010,0011, 100,那么上述符号序列变成011110001110011101101000000010010010111,共用了39bit。尽管有些码字如 S3,S4,S5,S6变长了(由3位变成4位),但使用频繁的几个码字如S0,S1变短了,所以实现了压缩。对于上述的编码可能导致解码出现非单值性:比如说,如果S0的码字为01,S2的码字为011,那么当序列中出现011时,你不知道是S0的码字后面跟了个1,还是完整的一个S2的码字。因此,编码必须保证较短的编码决不能是较长编码的前缀。符合这种要求的编码称之为前缀编码。要构造符合这样的二进制编码体系,可以通过二叉树来实现。-Suppose a file appears in eight kinds of symbols S0, SQ, S2, S3, S4, S5, S6, S7, then each symbol to be encoded, at least 3bit. Suppose encoding 000,001, 010,011,100,101,110,111. Then the symbolic sequence S0S1S7S0S1S6S2S2S3S4S5S0S0S1 encoded into 000001111000001110010010011100101000000001, sharing a 42bit. We found that S0, S1, S2 these three symbols the frequency of relatively large, the other symbols the frequency is relatively smal

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 想学习算法的朋友,可以看看拉格朗日算法参考参考
    想学习算法的朋友,可以看看拉格朗日算法参考参考-Want to learn algorithms Friend, you can look at the Lagrangian algorithm reference reference
    2023-02-03 01:05:04下载
    积分:1
  • 模拟银行家算法,有效避免死锁.附带详细的实验报告!
    模拟银行家算法,有效避免死锁.附带详细的实验报告!-Simulation bankers algorithm avoid deadlock. The report detailed experimental fringe!
    2022-02-28 14:45:21下载
    积分:1
  • sybase备份和还原,挺不错的,给大家看看吧,有兴趣就用...
    sybase数据备份和还原,挺不错的,给大家看看吧,有兴趣就用-data backup and restore, they are good for everyone to see it, with interest
    2022-04-10 07:27:58下载
    积分:1
  • This article discusses in detail the design of online examination system and imp...
    本文详细论述了网上考试系统的设计与实现,该系统基本实现了需求分析中的功能要求,其中考生信息主要由数据库直接输入,考生成功登录后进入考生界面,考生界面主要由考试、成绩查询,试时考生输入准考证号码、考生姓名、验证码,核对正确后进入考场,关键实现了考生在选择科目后由系统随机抽题、自动组卷后进入考试页面,考-This article discusses in detail the design of online examination system and implementation of the system to achieve a basic needs analysis of the functional requirements, in which candidates from the database information directly into the main candidates to enter the candidates after the successful login interface, the main candidates from the interface results in the examination information, test when the candidates enter the ticket number, candidate name, authentication code to enter the examination room after checking the correct key to the achievement of the candidates in the selection of subjects were randomly drawn by the system after the title, Automatic Test Paper into test page test
    2023-01-02 14:55:06下载
    积分:1
  • ACCESS常用窗体查询,例举多种窗体查询的方法
    ACCESS常用窗体查询,例举多种窗体查询的方法-ACCESS commonly used form inquiry, examples of a variety of form queries
    2023-05-03 00:05:03下载
    积分:1
  • 基于ADODC和ACCESS的客户管理程序,可实现客户信息的添加、删除、查询、修改等。...
    基于ADODC和ACCESS的客户管理程序,可实现客户信息的添加、删除、查询、修改等。-Based on customer management ADODC and ACCESS programs for customer information to add, delete, query, modify and so on.
    2023-07-02 23:55:04下载
    积分:1
  • Balance
    数据结构 Balance-Bi-Tree 数据结构 Balance-Bi-Tree 数据结构 Balance-Bi-Tr-data structure Balance- Bi-Tree data structure Balance- Bi-Tr ee data structure Balance- Bi-Tree data structure Balance- Bi-Tr
    2023-07-30 19:40:02下载
    积分:1
  • 用C#语言书写的用于Microsoft SQL Server库备份和恢复的类,带进度条...
    用C#语言书写的用于Microsoft SQL Server数据库备份和恢复的类,带进度条-With C# Language written for Microsoft SQL Server database backup and recovery class, with the progress bar
    2022-07-04 01:47:15下载
    积分:1
  • 宾馆管理信息系统
    宾馆管理信息系统-Hotels Management Information System
    2022-02-04 23:55:41下载
    积分:1
  • 在PHP项目管理软件
    应用背景PHP项目管理是在GPL下发布了一个免费的开源应用要求PHP 4 +MySQL 4 +Apache或者IIS关键技术安装解压所有文件/文件夹。编辑connect.php并输入数据库信息。复制所有文件/文件夹到您的网站空间。运行create.php创建数据库称为“phptask”和创建的所有数据库表。重命名或删除文件create.php在成功安装。管理员用户的名字是“user123”,与“一”的口令。
    2023-08-05 02:45:03下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载