From 71f0ce568817a16f951a9bc728fac515b3eb3b5f Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Wed, 10 Jun 2009 15:50:35 -0400 Subject: [PATCH] more effective use of byte-arrays --- basis/compression/inflate/inflate.factor | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/basis/compression/inflate/inflate.factor b/basis/compression/inflate/inflate.factor index 7cb43ac68f..48b831be9e 100755 --- a/basis/compression/inflate/inflate.factor +++ b/basis/compression/inflate/inflate.factor @@ -195,16 +195,16 @@ CONSTANT: dist-table PRIVATE> ! for debug -- shows residual values -: reverse-png-filter' ( lines -- filtered ) +: reverse-png-filter' ( lines -- byte-array ) [ first ] [ 1 tail ] [ map ] bi-curry@ bi nip - concat [ 128 + 256 wrap ] map ; + concat [ 128 + ] B{ } map-as ; -: reverse-png-filter ( lines -- filtered ) +: reverse-png-filter ( lines -- byte-array ) dup first [ 0 ] replicate prefix [ { 0 0 } prepend ] map 2 clump [ first2 dup [ third ] [ 0 2 rot set-nth ] bi png-unfilter-line - ] map concat ; + ] map B{ } concat-as ; : zlib-inflate ( bytes -- bytes ) bs: