Chilkat HOME .NET Core C# Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi ActiveX Delphi DLL Go Java Lianja Mono C# Node.js Objective-C PHP ActiveX PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift 2 Swift 3,4,5... Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(Tcl) Decompress BytesDemonstrates how to decompress binary data.
load ./chilkat.dll # 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 set fac [new_CkFileAccess] set compressedBytes [new_CkByteData] set success [CkFileAccess_ReadEntireFile $fac "qa_data/compressed/compressedBmp.dat" $compressedBytes] if {[CkFileAccess_get_LastMethodSuccess $fac] != 1} then { puts [CkFileAccess_lastErrorText $fac] delete_CkFileAccess $fac delete_CkByteData $compressedBytes exit } set compress [new_CkCompression] CkCompression_put_Algorithm $compress "deflate" set decompressedBytes [new_CkByteData] set success [CkCompression_DecompressBytes $compress $compressedBytes $decompressedBytes] if {[CkCompression_get_LastMethodSuccess $compress] != 1} then { puts [CkCompression_lastErrorText $compress] delete_CkFileAccess $fac delete_CkByteData $compressedBytes delete_CkCompression $compress delete_CkByteData $decompressedBytes exit } set success [CkFileAccess_WriteEntireFile $fac "qa_output/decompressed.bmp" $decompressedBytes] if {[CkFileAccess_get_LastMethodSuccess $fac] != 1} then { puts [CkFileAccess_lastErrorText $fac] delete_CkFileAccess $fac delete_CkByteData $compressedBytes delete_CkCompression $compress delete_CkByteData $decompressedBytes exit } delete_CkFileAccess $fac delete_CkByteData $compressedBytes delete_CkCompression $compress delete_CkByteData $decompressedBytes |
© 2000-2024 Chilkat Software, Inc. All Rights Reserved.