⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 examples.txt

📁 数据压缩算术编码
💻 TXT
字号:
simple_*.c is a simple way to use it; it does a 2-pass scan over
the input data (60000 bytes at a time), one to collect statistics
and a second one to code.

The codetable used is sent along as 2-byte unsigned int frequency
counts (not very efficient, but that's teaching material anyway).

comp/decomp is an adaptive order 0 coder using qsmodel to estimate
probabilities. qsmodel is a fast counter with the drawback of doing
periodic adaption and not after each symbol. See qsmodel.h for more
info.

comp1/decomp1 is a modification of comp and decomp to be order 1
coders; I recommend running a diff of the source files between
the order 0 and order 1 versions.

This is mainly to show that the frequency estimations can come
from different models/rules/sources/whatever and still can form one
rangecoder stream.
It also serves as usage examples of qsmodel and rangecoder so that
you have at least one working application.

have fun

Michael


legal stuff (qotes from GNU public license, which applies to this program)
(No known bugs, but nevertheless):

>  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
>FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
>OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
>PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
>OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
>MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
>TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
>PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
>REPAIR OR CORRECTION.
>
>  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
>WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
>REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
>INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
>OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
>TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
>YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
>PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
>POSSIBILITY OF SUCH DAMAGES.

Another warning, just to make sure you know:
Compression is about removing redundancy from data, so an error on the
compressed data has a larger effect than an error on the raw data.
Whenever you use these programs make sure to do a periodic restart of
the coder and the model - only such restarts allow resyncronisation of
encoder and decoder after a data error. Example: If you use comp1 on
a tar-file of a whole disk and suffer a data error everything in the
tar-file after the error is lost - comp does not restart.


contact:
michael@compressconsult.com
http://www.compressconsult.com/rangecoder/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -