refactors +parse:base64
:: +parse:base64: parse base64 cord to +octs
::
++ parse
+ =< ^- $-(nail (like octs))
%+ sear reduce
;~ plug
%- plus ;~ pose
==
(stun 0^2 (cold %0 tis))
==
- :: +reduce: reduce, measure, and swap base64 digits
+ |%
+ :: +reduce:parse:base64: reduce, measure, and swap base64 digits
::
++ reduce
|= [dat=(list @) dap=(list @)]
- ^- (unit [len=@ud dat=@])
+ ^- (unit octs)
=/ lat (lent dat)
=/ lap (lent dap)
=/ dif (~(dif fo 4) 0 lat)
(weld dat (reap dif 0))
|=([p=@ q=@] (add p (mul 64 q)))
--
+ --
:: +en-base64url: url-safe base64 encoding, without padding
::
++ en-base64url
