arith-code.h

来自「MANTIS是由科罗拉多大学开发的传感器网络嵌入式操作系统。 这是mantis」· C头文件 代码 · 共 51 行

H
51
字号
//  This file is part of MANTIS OS, Operating System//  See http://mantis.cs.colorado.edu/////  Copyright (C) 2003,2004,2005 University of Colorado, Boulder////  This program is free software; you can redistribute it and/or//  modify it under the terms of the mos license (see file LICENSE)/** @file arith-code.h * @brief Symbol coding. * * largely based on: http://dogma.net/markn/articles/arith/ *//** @brief Max allowed frequency count. */#define ARITH_CODE_MAXIMUM_SCALE   16383  /** @brief Escape symbol. */#define ARITH_CODE_ESCAPE          256  /** @brief Output stream empty symbol. */#define ARITH_CODE_DONE            -1    /** @brief Symbol to flush the model. */#define ARITH_CODE_FLUSH           -2   /** @brief A symbol can be an int or a pair of counts on a scale.   Here is the structure for the latter. */typedef struct {  /** @brief Overflow bits for start of code range.*/   unsigned short int low_count;   /** @brief Overflow bits for end of code range. */   unsigned short int high_count;   /** @brief Scale used */   unsigned short int scale;} arith_code_symbol_t;/** @brief Encode a symbol * @param in_buf Input buffer * @param in_len Input length * @param out_buf Output buffer * @param out_len Output length */void arith_code_encode (char *in_buf, uint8_t in_len,			char *out_buf, uint8_t out_len);/** @brief Decode a symbol * @param in_buf Input buffer * @param in_len Input length * @param out_buf Output buffer * @param out_len Output length */void arith_code_decode (char *in_buf, uint8_t in_len,			char *out_buf, uint8_t out_len);

⌨️ 快捷键说明

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