make run-length compression output a byte-array

db4
Doug Coleman 2009-06-09 11:52:14 -04:00
parent 6e26ea1952
commit 9649a191bb
1 changed files with 6 additions and 2 deletions

View File

@ -1,7 +1,11 @@
! Copyright (C) 2009 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: arrays grouping sequences ;
USING: accessors arrays combinators grouping kernel locals math
math.matrices math.order multiline sequence-parser sequences
tools.continuations ;
IN: compression.run-length
: run-length-uncompress ( byte-array -- byte-array' )
2 group [ first2 <array> ] map concat ;
2 group [ first2 <array> ] map B{ } concat-as ;