Run-length encoding: Difference between revisions

(Undo revision 360776 by Aarde (talk))
Line 2,835:
This gives RLE encoding for strings and RLE decoding for strings and arrays, e.g., for [[Conway's_Game_of_Life|Conway's Game of Life]]
<syntaxhighlight lang=FutureBasic>
 
Dynamic a(1, 1) as Short // Self-fulfilling array, so don't need width and height
 
 
local fn encode( string as CFStringRef) as CFStringRef
Line 2,878 ⟶ 2,875:
 
 
local fn decode2D( string as CFStringRef ) // For Game of Life
Boolean a(500, 500) // Or larger to hold bigger objects
CFStringRef ch
Short i, j, rl, f // Decoded char
60

edits