Sample code for 30+ languages & platforms
AutoIt

.Z File Compression

See more Zip Examples

Use LZW compression to create a .Z compressed file. Compresses any single file into a .Z format compressed file.

(Chilkat's .Z compression functionality is included as part of the Chilkat Zip license.)

Chilkat AutoIt Downloads

AutoIt
Local $bSuccess = False

; This example assumes the Chilkat API to have been previously unlocked.
; See Global Unlock Sample for sample code.

$oUc = ObjCreate("Chilkat.UnixCompress")

$bSuccess = $oUc.CompressFile("hamlet.xml","hamlet.xml.Z")
If ($bSuccess <> True) Then
    ConsoleWrite($oUc.LastErrorText & @CRLF)
Else
    ConsoleWrite("Success." & @CRLF)
EndIf