In my API Gateway I'm attempting to GZIP Compress a Base64 encoded string. This Base64 encoded string is a JWT that I've generated using the Encode Json Web Token assertion.
Once I GZIP compress this Base64 encoded string I'm noticing that its appearing as a ton of odd symbols. I thought that this was occurring because of my Base64 encoded string however I'm noticing the same weird characters when I GZIP compress a basic string context variable with a value of "TestTestTest". Does anyone know why this would happen? I'm unable to decompress this compressed value using GZIP decompression because it doesn't appear to be valid GZIP Compressed data.
Heres what it looks like when I go to GZIP compress a context variable with the value of "TestTestTest"
Dear mrutherford ,
gzip is in binary format, that's why you see those wired chars.
Thanks for the clarification. Once I GZIP Compress this value I seem to be unable to GZIP Decompress it. I'm receiving an error message saying: Error encoding or decoding: Not in GZIP format.
May need more details on how you do it to understand what's going on.
Are the compress, decompress in the same policy, or in different services? You may upload your test policies for review. (it's better to open a support ticket)
if you pass the gzip payload with header accept-encoding: gzip, it may be decompressed automatically. you can use the audit detail assertion to check the gzip value before decompress.
In my test policy I'm doing the following:
I've used the Audit Detail Assertion and Service Debugger and I can see that the context variable that I use as the Target Variable in the Encode/Decode GZIP Compress assertion is populated with that binary value.