]> gitweb.factorcode.org Git - factor.git/commitdiff
base64: inline the { 3 2 1 0 } [ -6 * ].
authorJohn Benediktsson <mrjbq7@gmail.com>
Tue, 29 Apr 2014 22:59:48 +0000 (15:59 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 29 Apr 2014 22:59:48 +0000 (15:59 -0700)
basis/base64/base64.factor

index 7ca29c0119c39a47fdc2e7d39a768670569383d1..0f25a812be83c33422da8d4ee7acb11192ce752a 100644 (file)
@@ -50,8 +50,8 @@ SYMBOL: column
 
 : encode3 ( seq -- )
     column output-stream get '[
-        swap be> { 3 2 1 0 } [
-            -6 * shift 0x3f bitand ch>base64 _ write1-lines
+        swap be> { -18 -12 -6 0 } [
+            shift 0x3f bitand ch>base64 _ write1-lines
         ] with each
     ] change ; inline