! Copyright (C) 2009 Marc Fauconneau.\r
! See http://factorcode.org/license.txt for BSD license.\r
-USING: accessors alt.bitstreams arrays assocs constructors fry\r
+USING: accessors arrays assocs constructors fry\r
hashtables io kernel locals math math.order math.parser\r
math.ranges multiline sequences ;\r
IN: compression.huffman\r
\r
-QUALIFIED-WITH: alt.bitstreams bs\r
+QUALIFIED-WITH: bitstreams bs\r
\r
<PRIVATE\r
\r
sorting ;\r
IN: compression.inflate\r
\r
-QUALIFIED-WITH: alt.bitstreams bs\r
+QUALIFIED-WITH: bitstreams bs\r
\r
<PRIVATE\r
\r
2 clump [ first2 dup [ third ] [ 0 2 rot set-nth ] bi png-unfilter-line ] map concat ;\r
\r
: zlib-inflate ( bytes -- bytes )\r
- bs:<lsb0-bitstream>\r
+ bs:<lsb0-bit-reader>\r
[ check-zlib-header ]\r
[ inflate-loop ] bi\r
inflate-lz77 ;\r
sequences sequences.deep ;\r
IN: images.jpeg\r
\r
-QUALIFIED-WITH: alt.bitstreams bs\r
+QUALIFIED-WITH: bitstreams bs\r
\r
TUPLE: jpeg-image < image\r
{ headers }\r
\r
: baseline-decompress ( -- )\r
jpeg> bitstream>> cleanup-bitstream { 255 255 255 255 } append\r
- >byte-array bs:<msb0-bitstream> jpeg> (>>bitstream)\r
+ >byte-array bs:<msb0-bit-reader> jpeg> (>>bitstream)\r
jpeg> [ bitstream>> ] [ [ [ <huffman-decoder> ] with map ] change-huff-tables drop ] bi\r
jpeg> components>> [ fetch-tables ] each\r
jpeg> setup-bitmap\r