zuse: rewrites |base16 for clarity, simplicity, specificity
|%
++ en
~/ %en
- |= a=(pair @ud @) :: $octs, but safe
- ^- cord
- :: trailing zero bytes, possible truncated input
- ::
- =/ [pad=@ud dat=@]
- =/ wid (met 3 q.a)
- ?: (gte p.a wid)
- [(sub p.a wid) q.a]
- =/ dat (cut 3 [0 p.a] q.a)
- =. wid (met 3 dat)
- [(sub p.a wid) dat]
- ::
- =/ dap (add (mod (met 2 dat) 2) (mul 2 pad))
- %+ rap 3
- %+ weld (reap dap '0')
- %- flop
- %+ turn (rip 2 dat)
- |= a=@C ^- cord
- ?: (lth a 10)
- (add '0' a)
- (add 'a' (sub a 10))
+ |= a=octs ^- cord
+ (crip ((x-co:co (mul p.a 2)) (end 3 p.a q.a)))
::
++ de
~/ %de
- |= a=cord
- ^- (unit (pair @ud @)) :: $octs, but safe
+ |= a=cord ^- (unit octs)
(rush a rule)
::
++ rule
- |^ (bass 3 16 (star hit))
- ::
- :: shadowed for bloq-length capture
- ::
- ++ bass
- |* [boq=@u wuc=@u tyd=^rule]
%+ cook
- |= waq=(list @)
- =/ wid (mul (lent waq) (dec (xeb wuc)))
- :- (rsh 0 boq (add wid (dec (bex boq))))
- (roll waq |=([p=@ q=@] (add (end 0 wuc p) (mul wuc q))))
- tyd
- --
+ |= a=(list @) ^- octs
+ [(add (dvr (lent a) 2)) (repn 4 (flop a))]
+ (star hit)
--
:: :: ++en-base64:mimes:
++ en-base64 :: encode base64
