<< Click to Display Table of Contents >> Navigation: 3. Script Language > ZIP. - Handle Archives > ZIP-Commands |
MiniRobotLanguage (MRL)
ZIP.compress var
Compress the content of a variable
Intention
The ZIP.cv - Command can be used to used to compress the content of a variable.
There are generally two ways of usage.
' Give Source- and Target variable
ZIP.cv|$$TXT|$$TAR
or
' ZIP the Content of the given variable
ZIP.cv|$$TXT
The "cv" and the "uv" command are not compatible with standard ZIP-Format.
Syntax
ZIP.cv|P2[|P3]
The "cv" and the "uv" command are not compatible with standard ZIP-Format.
Parameter Explanation
P1 - "cv" or "compress var"
P2 - Variable with Content to be compressed. If P3 is missing, Result is placed in this variable.
P3 - Variable for the compressed result.
Example
'***********************************************
' Sample 1: ZIP.
'***********************************************
'
$$FIL=?path\readme.txt
CFF.$$FIL|$$TXT
FOR.§§LOP|0|10
ZIP.sdc|§§LOP
DBP.Compression is §§LOP
CFF.$$FIL|$$TXT
LEN.$$TXT|$$LEA
DBP.Original=$$LEA
$$TIA=#dtime#
ZIP.cv|$$TXT|$$TAR
$$TIB=#dsince#
CAL.$$TIT=$$TIB|r
LEN.$$TAR|$$LEB
DBP.Compressed=$$LEB / Time: $$TIT sec.
ZIP.uv|$$TAR
LEN.$$TAR|$$LEC
DBP.UnCompressed=$$LEC
NEX.
ENR.
'***********************************************
' Sample 2: ZIP.
'***********************************************
'
$$FIL=?path\readme.txt
CFF.$$FIL|$$TXT
LEN.$$TXT|$$LEA
DBP.Original=$$LEA
$$TIA=#dtime#
ZIP.cv|$$TXT|$$TAR
$$TIB=#dsince#
CAL.$$TIT=$$TIB|r
LEN.$$TAR|$$LEB
DBP.Compressed=$$LEB / Time: $$TIT
$$TIA=#dtime#
ZIP.cv|$$TXT
$$TIB=#dsince#
CAL.$$TIT=$$TIB|r
LEN.$$TXT|$$LEB
DBP.Compressed=$$LEB / Time: $$TIT
'***********************************************
' Sample 3: ZIP.
'***********************************************
'
$$FIL=?path\readme.txt
$$FIB=?path\readme_2.txt
: %LenCs 1
GMD.|§§§01|§§CSA
LEN.§§§01|§§LEA
DBP.Original=§§LEA * Checksum: §§CSA
END%
' Loading Textfile into Variable
CFF.$$FIL|$$TXT
%LenCs $$TXT
'Compressing COntent of Variable
$$TIA=#dtime#
ZIP.cv|$$TXT|$$TAR
$$TIB=#dsince#
CAL.$$TIT=$$TIB|r
%LenCs $$TAR
' Uncompressing content of variable
$$TIA=#dtime#
ZIP.uv|$$TAR
$$TIB=#dsince#
MBX.$$TAR|$$TAR
CAL.$$TIT=$$TIB|r
%LenCs $$TAR
' Textdatei unter anderem Namen herausschreiben
CTF.$$FIB|$$TAR
ENR.
Remarks
The "cv" and the "uv" command are not compatible with standard ZIP-Format.
Limitations:
There is a size limitation that depends on the available 32-bit Memory in the WOW64.
Its somewhere between 1 GB and 2 GB.
See also:
• sdk - set default compression