16位rle(压缩bmp文件)压缩算法源码 (Dos, 16KB)

  • n5_942233
    了解作者
  • 16.2KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-05-30 06:26
    上传日期
压缩编码有点用,看看吧-coding using a bit, and let's see it
rle(Dos, 16KB).zip
  • RLE16.C
    10.2KB
  • RLE16.EXE
    8.8KB
  • RLE16.DOC
    4.6KB
  • UNRLE16.EXE
    7.5KB
  • RLE16.H
    824B
  • UNRLE16.C
    2.2KB
  • www.pudn.com.txt
    218B
内容介绍
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta charset="utf-8"><meta name="generator" content="pdf2htmlEX"><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><link rel="stylesheet" href="https://csdnimg.cn/release/download_crawler_static/css/base.min.css"><link rel="stylesheet" href="https://csdnimg.cn/release/download_crawler_static/css/fancy.min.css"><link rel="stylesheet" href="https://csdnimg.cn/release/download_crawler_static/881409/raw.css"><script src="https://csdnimg.cn/release/download_crawler_static/js/compatibility.min.js"></script><script src="https://csdnimg.cn/release/download_crawler_static/js/pdf2htmlEX.min.js"></script><script>try{pdf2htmlEX.defaultViewer = new pdf2htmlEX.Viewer({});}catch(e){}</script><title></title></head><body><div id="sidebar" style="display: none"><div id="outline"></div></div><div id="pf1" class="pf w0 h0" data-page-no="1"><div class="pc pc1 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://csdnimg.cn/release/download_crawler_static/881409/bg1.jpg"><div class="c x0 y1 w2 h2"><div class="t m0 x1 h3 y2 ff1 fs0 fc0 sc0 ls0 ws0">Run Length Encoding compressor program 16 bit header version</div><div class="t m0 x1 h3 y3 ff1 fs0 fc0 sc0 ls0 ws0">Written by Shaun Case 1991 in Borland C++ 2.0</div><div class="t m0 x1 h3 y4 ff1 fs0 fc0 sc0 ls0 ws0"> with sizeof (int) == 2</div><div class="t m0 x1 h3 y5 ff1 fs0 fc0 sc0 ls0 ws0">This program and its source code are Public Domain.</div><div class="t m0 x1 h3 y6 ff1 fs0 fc0 sc0 ls0 ws0">This program should be portable to any machine with</div><div class="t m0 x1 h3 y7 ff1 fs0 fc0 sc0 ls0 ws0">2 byte short ints and 8 bit bytes.</div><div class="t m0 x1 h3 y8 ff1 fs0 fc0 sc0 ls0 ws0">What is run length encoding?</div><div class="t m0 x1 h3 y9 ff1 fs0 fc0 sc0 ls0 ws0">Run Length Encoding, also known as RLE, is a method of compressing data</div><div class="t m0 x1 h3 ya ff1 fs0 fc0 sc0 ls0 ws0">that has a lot of "runs" of bytes (or bits) in it. A "run" is a series</div><div class="t m0 x1 h3 yb ff1 fs0 fc0 sc0 ls0 ws0">of bytes that are all the same. For instance, the string "THIS IS A</div><div class="t m0 x1 h3 yc ff1 fs0 fc0 sc0 ls0 ws0">VEEEEEEEEEEEEEEEEEEEEEEEERY INTERESTING SENTENCE" has a run of 23 'E's</div><div class="t m0 x1 h3 yd ff1 fs0 fc0 sc0 ls0 ws0">in it. This could be compressed in the following manner:</div><div class="t m0 x1 h3 ye ff1 fs0 fc0 sc0 ls0 ws0">THIS IS A V23ERY INTERESTING SENTENCE</div><div class="t m0 x1 h3 yf ff1 fs0 fc0 sc0 ls0 ws0">resulting in a savings of 20 characters. A further savings of one</div><div class="t m0 x1 h3 y10 ff1 fs0 fc0 sc0 ls0 ws0">character can be realized if the sequence "23" is replaced by a single</div><div class="t m0 x1 h3 y11 ff1 fs0 fc0 sc0 ls0 ws0">byte with the value 23.</div><div class="t m0 x1 h3 y12 ff1 fs0 fc0 sc0 ls0 ws0">However, if the text to be encoded is arbitrary, then it may contain</div><div class="t m0 x1 h3 y13 ff1 fs0 fc0 sc0 ls0 ws0">numbers as well as letters, and bytes of all possible values. For this</div><div class="t m0 x1 h3 y14 ff1 fs0 fc0 sc0 ls0 ws0">reason, there must be some way to let the decoder know when a compressed</div><div class="t m0 x1 h3 y15 ff1 fs0 fc0 sc0 ls0 ws0">run is encountered, and when a sequence to be passed straight through is</div><div class="t m0 x1 h3 y16 ff1 fs0 fc0 sc0 ls0 ws0">encountered. For this reason, the following file format was used:</div><div class="t m0 x1 h3 y17 ff1 fs0 fc0 sc0 ls0 ws0">========= tech info =========</div><div class="t m0 x1 h3 y18 ff1 fs0 fc0 sc0 ls0 ws0">16 bit header version.</div><div class="t m0 x1 h3 y19 ff1 fs0 fc0 sc0 ls0 ws0">File format:</div><div class="t m0 x1 h3 y1a ff1 fs0 fc0 sc0 ls0 ws0">13 bytes : original filename, followed by:</div><div class="t m0 x1 h3 y1b ff1 fs0 fc0 sc0 ls0 ws0">[ 16 bit header + data ][ 16 bit header + data ][16 bit header + data ]</div><div class="t m0 x1 h3 y1c ff1 fs0 fc0 sc0 ls0 ws0">etc..</div><div class="t m0 x1 h3 y1d ff1 fs0 fc0 sc0 ls0 ws0">header:</div><div class="t m0 x1 h3 y1e ff1 fs0 fc0 sc0 ls0 ws0">[lo byte][hi byte] ==&gt; turn into 16 bit int ==&gt;</div><div class="t m0 x1 h3 y1f ff1 fs0 fc0 sc0 ls0 ws0"> bit 15 : 1 if following byte is a run</div><div class="t m0 x1 h3 y20 ff1 fs0 fc0 sc0 ls0 ws0"> bit 14 - 0 : length of run (max 32767, min 4)</div><div class="t m0 x1 h3 y21 ff1 fs0 fc0 sc0 ls0 ws0">data: 1 byte : which character run consists of</div><div class="t m0 x1 h3 y22 ff1 fs0 fc0 sc0 ls0 ws0">*** OR ***</div><div class="t m0 x1 h3 y23 ff1 fs0 fc0 sc0 ls0 ws0">header:</div><div class="t m0 x1 h3 y24 ff1 fs0 fc0 sc0 ls0 ws0">[lo byte][hi byte] ==&gt; turn into 16 bit int ==&gt;</div><div class="t m0 x1 h3 y25 ff1 fs0 fc0 sc0 ls0 ws0"> bit 15 : 0 if following bytes are sequence</div><div class="t m0 x1 h3 y26 ff1 fs0 fc0 sc0 ls0 ws0"> bit 14 - 0 : length of sequence (max 32767)</div><div class="t m0 x1 h3 y27 ff1 fs0 fc0 sc0 ls0 ws0">data: (header &amp; 0x7FFF) bytes of data</div><div class="t m0 x1 h3 y28 ff1 fs0 fc0 sc0 ls0 ws0"> : data bytes copied to output stream unchanged</div><div class="t m0 x1 h3 y29 ff1 fs0 fc0 sc0 ls0 ws0">===============================</div></div></div><div class="pi" data-data='{"ctm":[1.611850,0.000000,0.000000,1.611850,0.000000,0.000000]}'></div></div></body></html>
评论
    相关推荐
    • 关键路径算法C++dos界面显示
      关键路径算法 用C++实现 dos界面显示
    • 开源DOS系统源代码
      如果想做一个Tiny OS系统,或者优化现有系统,或者能从中得到一些算法和解决方案
    • C# DOS 命令行方式实现Apriori算法.zip
      C# DOS 命令行方式实现Apriori算法.zip
    • DOS界面,磁盘调度算法
      磁盘调度算法,c实现,DOS界面 分别包含了FCFS,SSTF,SCAN,CSCAN. 另外实现了饥饿现象
    • 算法设计第一章习题解答
      Algorithm Design by Kleinberg and Tardos 第一章课后习题英文版全解答
    • VS dos界面双人五子棋
      自己编写的五子棋游戏,游戏环境是dos界面,不过没写AI算法,只能两人玩,但是dos界面自认为做的比较精美,请大家多多指点
    • 算法
      Este网站在软件开发和软件开发方面受到了广泛的重视,并实现了以下6种算法: Contagem:积分竞赛(包括1个主题),关于您的信息(包括) 斐波那契:Algoritmo对apresentarØ正ésimoELEMENTO达sequência德...
    • 算法设计(pdf)
      算法设计,作者:Kleinberg,.Tardos;内容是全英的,影印版。
    • dos界面下银行家算法
      简易的银行家算法。vc下cmd实现,参数全部在代码中设定,运行提示结果。
    • SIM800C_MQTT.rar
      使用SIM800C模块,使用MQTT协议,连接中国移动onenet平台,能实现数据的订阅、发布、存储等