lzstring

import lzstring

ic = {"name": "root", "password": "123456"}

x = lzstring.LZString()
compressed = x.compressToBase64(str(ic))
print(compressed)
decompressed = x.decompressFromBase64(compressed)
print(decompressed)
posted @ 2019-03-18 14:19  公众号python学习开发  阅读(930)  评论(0编辑  收藏  举报