]> gitweb.factorcode.org Git - factor.git/commitdiff
base85: change alphabet to byte-array.
authorJohn Benediktsson <mrjbq7@gmail.com>
Fri, 5 Apr 2019 20:03:19 +0000 (13:03 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Fri, 5 Apr 2019 20:03:19 +0000 (13:03 -0700)
extra/base85/base85.factor

index 40088ff40f8a2cd5940eb9f2df3d903970d93f73..5e21d73222f0415c8e321ef38b17fa2456742d88 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2013 John Benediktsson.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: base64.private combinators io io.binary
+USING: base64.private byte-arrays combinators io io.binary
 io.encodings.binary io.streams.byte-array kernel literals math
 namespaces sequences ;
 IN: base85
@@ -10,9 +10,12 @@ ERROR: malformed-base85 ;
 <PRIVATE
 
 <<
-CONSTANT: alphabet
+CONSTANT: alphabet $[
     "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!#$%&()*+-;<=>?@^_`{|}~"
+    >byte-array
+]
 >>
+
 : ch>base85 ( ch -- ch )
     alphabet nth ; inline