base85: simpler pad math.

freebsd-work
John Benediktsson 2019-01-26 07:14:09 -08:00
parent 4fbc726b1a
commit 82ad6cec2e
1 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ CONSTANT: alphabet
[
drop
[ 4 0 pad-tail encode4 ]
[ length neg 4 rem head-slice* write-lines ] bi
[ length 4 swap - head-slice* write-lines ] bi
(encode-base85)
]
} case ;
@ -55,7 +55,7 @@ PRIVATE>
[
drop
[ 5 CHAR: ~ pad-tail decode5 ]
[ length neg 5 rem head-slice* write ] bi
[ length 5 swap - head-slice* write ] bi
(decode-base85)
]
} case ;