]> gitweb.factorcode.org Git - factor.git/blob - basis/compression/run-length/run-length.factor
make run-length compression output a byte-array
[factor.git] / basis / compression / run-length / run-length.factor
1 ! Copyright (C) 2009 Doug Coleman.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors arrays combinators grouping kernel locals math
4 math.matrices math.order multiline sequence-parser sequences
5 tools.continuations ;
6 IN: compression.run-length
7
8
9 : run-length-uncompress ( byte-array -- byte-array' )
10     2 group [ first2 <array> ] map B{ } concat-as ;
11