For those who are looking for unziping features, Embedded Python (for IRIS 2021.2+) allows you to use zipfile Python lib. For instance:

ClassMethod UnZip(pZipFileName As %String, pExtractToDir As %String) [ Language = python ]
{
    #; solution based on this one: https://stackoverflow.com/a/3451150/345422
    import zipfile
    with zipfile.ZipFile(pZipFileName, 'r') as zip_ref:
        zip_ref.extractall(pExtractToDir)
}

Or

ClassMethod UnZip2(pZipFileName As %String, pExtractToDir As %String)
{
    Set zipfile = $SYSTEM.Python.Import("zipfile")
    Do zipfile.ZipFile(pZipFileName, "r").extractall(pExtractToDir)
}

Tested on iris-ml-community:2021.2.0.617.0-zpm

Hi!

Thanks for your code, but I tried it and can't get a file in the directory in the end. In order to get it working, I had to call the method %Save() before the %Close() one:

...
d file.CopyFrom(request.HttpResponse.Data)
d file.%Save()
w file.%Close()

I found that by this article by @Gevorg Arutiunianhttps://community.intersystems.com/post/save-file-using-nethttprequest