OPTIONS "C_CALL LABELCHECK"
LIBRARY rxzip
ziperr = "SYNTAX"
zipheading = 1
data1 = "This is some data." || "0D0A0D0A"x || "This is line two."|| "0D0A"x
data2 = "This is a test of the RxZip add-on dll." || "0D0A0D0A"x || "Hopefully this worked!"|| "0D0A"x
DO
zipcreate("ZipHandle", 500000, 'MEMORY')
zipadd(ziphandle, data1, "MEMORY", "data1.txt")
zipadd(ziphandle, data2, "MEMORY", "data2.txt")
zipgetmemory(ziphandle, "Data1")
CHAROUT("test.zip", data1)
LINEOUT("test.zip")
CATCH SYNTAX
CONDITION('M')
FINALLY
IF EXISTS("ZIPHANDLE") THEN zipclose(ziphandle)
END
|