```c++
//
// main.cpp
// arithmetic_encodec
//
// Created by ckm.
//
#include <iostream>
#include <string>
#include <cstring>
#include <map>
#include <vector>
#include <ctime>
#include <stack>
using namespace std;
class Arithmetic
{
public:
Arithmetic(){
length = 0;
}
~Arithmetic()= default;
void getProbabilities(char *str);
double encode(string str);
void runArithmetic();
void dec2bin(double n);
string decode(double value);
private:
class Range
{
public:
Range(){
low = 0.0;
high = 1.0;
deltaLevel = 1.0;
}
~Range()= default;
double getLow(){
return this -> low;
}
double getHigh(){
return this -> high;
}
void setLow(double low){
this -> low = low;
}
算术编码和译码(C++)
最新推荐文章于 2022-09-21 14:26:31 发布