Sample code for 30+ languages & platforms
AutoIt

Decompress Bytes

See more Compression Examples

Demonstrates how to decompress binary data.

Chilkat AutoIt Downloads

AutoIt
Local $bSuccess = False

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

;  See this example to compress bytes: Compress Bytes

$oFac = ObjCreate("Chilkat.FileAccess")

Local $oCompressedBytes
$oCompressedBytes = $oFac.ReadEntireFile("qa_data/compressed/compressedBmp.dat")
If ($oFac.LastMethodSuccess <> True) Then
    ConsoleWrite($oFac.LastErrorText & @CRLF)
    Exit
EndIf

$oCompress = ObjCreate("Chilkat.Compression")
$oCompress.Algorithm = "deflate"

Local $oDecompressedBytes
$oDecompressedBytes = $oCompress.DecompressBytes($oCompressedBytes)
If ($oCompress.LastMethodSuccess <> True) Then
    ConsoleWrite($oCompress.LastErrorText & @CRLF)
    Exit
EndIf

$bSuccess = $oFac.WriteEntireFile("qa_output/decompressed.bmp",$oDecompressedBytes)
If ($oFac.LastMethodSuccess <> True) Then
    ConsoleWrite($oFac.LastErrorText & @CRLF)
    Exit
EndIf