encode rules : json -> encrypt -> compress
decode rules : decompress  -> decrypt -> json