Question
· Jun 12, 2019

How to open file inside temporary GZIP archive?

Hello Everyone

I'm trying to open an XML that I get inside a GZIP file.
However, I can only open the contents when I save the file to a folder.
I would like to know if there is a way to get the contents of XML without saving the GZIP in a folder.

The code below is functional, however, you are saving GZIP before you can get the contents of the XML.

SET tGZIP = $System.Encryption.Base64Decode("############")
SET tFile= ##class(%File).%New("####")
SET tSC = tFile.Open("WSN")
SET tSC = tFile.Write(tGZIP)
DO tFile.%Save()
DO tFile.Close()
SET tSC = tFile.Open("RUK:::/GZIP=1:/NOXY=1")
WHILE 'tFile.AtEnd
 {
   SET tXML = tFile.ReadLine()
 }
Discussion (2)0
Log in or sign up to continue