Anonymous user
Move-to-front algorithm: Difference between revisions
m
→version 2: changed a comment.
m (→version 2: changed some comments and whitespace, used a template for output.) |
m (→version 2: changed a comment.) |
||
Line 1,752:
!= /*set the encode string to a null. */
do m=1 for words($); n=word($, m) +one /*decode the sequence table string. */
y=substr(@@, n, 1); !=! || y /*the decode symbol for the N word.
@@=y || delstr(@@, n, 1) /*rebuild the symbol table string. */
end /*m*/ /* [↑] the move─to─front decoding. */
|