Skip to content

a fast range coder in C++, using SSE

License

Notifications You must be signed in to change notification settings

lucastheis/rangecoder

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation

pip install range-coder 

Example

fromrange_coderimportRangeEncoder, RangeDecoder, prob_to_cum_freqdata= [2, 0, 1, 0, 0, 0, 1, 2, 2] prob= [0.5, 0.2, 0.3] # convert probabilities to cumulative integer frequency tablecumFreq=prob_to_cum_freq(prob, resolution=128) # encode dataencoder=RangeEncoder(filepath) encoder.encode(data, cumFreq) encoder.close() # decode datadecoder=RangeDecoder(filepath) dataRec=decoder.decode(len(data), cumFreq) decoder.close()

Packages

No packages published

Languages

  • C++71.1%
  • Python25.6%
  • Perl3.3%
close