Run-length encoding: Difference between revisions
Content added Content deleted
m (→{{header|Smalltalk}}: a note about a "feature" (without example)) |
m (→{{header|C}}: a note) |
||
Line 113: | Line 113: | ||
} |
} |
||
}</lang> |
}</lang> |
||
'''Final note''': since the repeat counter value 0 has no meaning, it could be used as it would be 256, so extending by one the maximum number of repetitions representable with a single byte; or instead it could be used as a special marker to encode in a more efficient way (long) sequences of ''isolated characters'', e.g. "ABCDE" would be encoded as "1A1B1C1D1E"; it could be instead encoded as "05ABCDE". |
|||
=={{header|Haskell}}== |
=={{header|Haskell}}== |