Arithmetic coding/As a generalized change of radix: Difference between revisions

m
J: remove incorrect quibbles
(J: add some comments)
m (J: remove incorrect quibbles)
Line 213:
aek 'TOBEORNOTTOBEORTOBEORNOT'
1150764267498783364 15</lang>
 
Note that this last variant appears to match some other implementations of this task, though the algorithm itself conflicts with the specification currently visible at [[wp:Arithmetic_coding#Arithmetic_coding_as_a_generalized_change_of_radix|wikipedia]] in several respects:
 
# The wikipedia description currently specifies "The cumulative frequency is the total of all frequencies below it in a frequency distribution (a running total of frequencies)" but that is not alphabetic order,
# The wikipedia description currently specifies for the "DABDDB" example the encoding "A = 0, B = 1, C = 2, D = 3" but that encoding is clearly not the specified cumulative frequencies.
 
=={{header|Perl}}==
6,962

edits