OPTIONS "C_CALL"
LIBRARY rxunzip
ziperr = "SYNTAX"
zipheading = 1
total = CHARS("MyTest.zip")
IF total > 0 THEN DO
data = CHARIN("MyTest.zip", , total)
DO
unzipopen("ZipHandle", data, "MEMORY")
unzipfinditem(ziphandle, "Count")
DO i = 1 TO count
unzipsetcurrentitem(ziphandle, "Info", i)
SAY "Unzipping..." info.0
SAY "Size =" info.1
unzipgetitem(ziphandle, info.0)
END
CATCH SYNTAX
CONDITION('M')
FINALLY
IF EXISTS("ZIPHANDLE") THEN unzipclose(ziphandle)
END
END
ELSE SAY "Can't find MyTest.zip" |