用法
评论
建议
取 消
确 定
(defun base64:decode (str-base64 / i res lst-base64 h%) "Decode base64 string." "list of unsigned 8bit integer." (if (p:stringp str-base64) (progn (setq lst-base64 (vl-string->list "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")) (setq i 0) (setq res (quote nil)) (setq h% 0) (foreach b (mapcar (quote (lambda (x) (vl-position x lst-base64))) (vl-string->list str-base64)) (if b (cond ((= i 0) (setq h% b) (setq i 1)) ((= i 1) (setq res (cons (+ (lsh h% 2) (/ b 16)) res)) (setq h% (logand b 15)) (setq i 2)) ((= i 2) (setq res (cons (+ (lsh h% 4) (/ b 4)) res)) (setq h% (logand b 2)) (setq i 3)) ((= i 3) (setq res (cons (+ (lsh h% 6) b) res)) (setq h% 0) (setq i 0))))) (reverse res))))
函数库使用说明
应用包
技术支持
统计信息
函数库规模: 747 个
函数库类别: 52 种
上传记录
刷新