I have a data provider who is passing base64 encoded zlib blobs to my Salesforce environment. I will be receiving this data into an Apex controller, and I already know how to convert the base64 string into a blob.

I am curious if there is any way to decompress the zlib blob in the controller itself.

I know there are javascript tools that will decompress the data, but I would prefer to handle this in the controller and let the browser simply display the data.

Thank you in advance!

  • Not likely. Much better to use the existing tools you already know. – Adrian Larson May 1 '19 at 21:19

You might be able to glean the necessary information from Zippex, which provides reading and writing ZIP files using the standard compression algorithms. Please note that bitwise manipulation in Apex is extremely limited, so the performance will be relatively abysmal compared to using a JavaScript solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.