decompressAndDecrypt function
Implementation
Map<String, dynamic> decompressAndDecrypt(String anonKey, String content) {
try {
final gzip = GZipDecoder();
final compressedJson = base64.decode(content);
final json = utf8.decode(gzip.decodeBytes(compressedJson));
return jsonDecode(json);
} catch (e) {
throw Exception(
'Error decompressing and decrypting, message: ${e.toString()}');
}
}