Minify json before compressing
This commit is contained in:
@@ -19,7 +19,9 @@ def decode_rpgsave(save):
|
|||||||
|
|
||||||
def encode_rpgsave(save):
|
def encode_rpgsave(save):
|
||||||
lz = lzstring.LZString()
|
lz = lzstring.LZString()
|
||||||
encoded = lz.compressToBase64(save)
|
parsed = json.loads(save)
|
||||||
|
minified = json.dumps(parsed, separators=(',', ':'))
|
||||||
|
encoded = lz.compressToBase64(minified)
|
||||||
return encoded
|
return encoded
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user