Arithmetic Coding and decoding

Encodes a message using arithmetic coding and decodes it
1.7K Downloads
Updated 8 Oct 2012

View License

USES MATLAB built-in functions "arithenco" and "arithdeco" to encode and decode respectively the entered String message.

ARITHENCO Encode a sequence of symbols using arithmetic coding.
CODE = ARITHENCO(SEQ, COUNTS) generates binary arithmetic code corresponding to the sequence of symbols specified in the vector SEQ.
The vector COUNTS contains the symbol counts (the number of times each
symbol of the source's alphabet occurs in a test data set) and represents
the source's statistics.

ARITHDECO Decode binary code using arithmetic decoding.
DSEQ = ARITHDECO(CODE, COUNTS, LEN) decodes the binary arithmetic code
in the vector CODE (generated using ARITHENCO) to the corresponding
sequence of symbols. The vector COUNTS contains the symbol counts (the
number of times each symbol of the source's alphabet occurs in a test
data set) and represents the source's statistics. LEN is the number of symbols to be decoded.

Cite As

Cavin Dsouza (2024). Arithmetic Coding and decoding (https://www.mathworks.com/matlabcentral/fileexchange/38517-arithmetic-coding-and-decoding), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2008a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Encryption / Cryptography in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0