Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
24
Task/Base64-decode-data/PicoLisp/base64-decode-data.l
Normal file
24
Task/Base64-decode-data/PicoLisp/base64-decode-data.l
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
(setq *Char64
|
||||
`'(chop
|
||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" ) )
|
||||
(de decode64 (S)
|
||||
(let S (chop S)
|
||||
(pack
|
||||
(make
|
||||
(while S
|
||||
(let
|
||||
(A (dec (index (++ S) *Char64))
|
||||
B (dec (index (++ S) *Char64))
|
||||
C (dec (index (++ S) *Char64))
|
||||
D (dec (index (++ S) *Char64)) )
|
||||
(link
|
||||
(char (| (>> -2 A) (>> 4 B))) )
|
||||
(and
|
||||
C
|
||||
(link
|
||||
(char
|
||||
(| (>> -4 (& B 15)) (>> 2 C)) ) )
|
||||
D
|
||||
(link
|
||||
(char (| (>> -6 (& C 3)) D)) ) ) ) ) ) ) ) )
|
||||
(prinl (decode64 "VG8gZXJyIGlzIGh1bWFuLCBidXQgdG8gcmVhbGx5IGZvdWwgdGhpbmdzIHVwIHlvdSBuZWVkIGEgY29tcHV0ZXIuCiAgICAtLVBhdWwgUi5FaHJsaWNo"))
|
||||
Loading…
Add table
Add a link
Reference in a new issue