ZIP - inflating and deflating (.z and .gz format) strings using zlib
Posted September 18th, 2008 by andyfaff
Downloaded 20 times
This XOP will inflate and deflate strings that contain information encoded in .z and .gz formats. It will not handle .zip or multifile zip files. The encoding is done in .gz format.
It is based on the free zlib library.
Useage:
string test = "0123456789" string test2 = zipencode(test) string test3 = zipdecode(test2) print test3
or
variable fileID open/r fileID //open a .gz file fStatus fileID //get the length of the file in bytes string inData = "" inData = padstring(indata,V_logEOF,0) //make the indata string as long as the fileitself fbinread fileiD, inData //read in the data string unzippedData = zipdecode(inData) //unzip the data in the string close(fileID)
This can be useful for zipping and unzipping waves using the SOCKIT.xop. (This has commands SOCKITstringtoWave and SOCKITwavetostring).
Releases
| Development snapshots | Date | Size | Links |
|---|---|---|---|
| IGOR.5.04.x-1.x-dev | 2008-Sep-18 | 219.44 KB |
Subversion Repository:
svn://svn.igorexchange.com/packages/ZIP/