Visual C++ Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript



Visual C++ Examples

CkString
Byte Array
Bounced Mail
Character Encoding
Digital Certificates
Digital Signatures
Email
Encryption
FTP
HTML-to-XML
HTTP
IMAP
MHT / HTML Email
RSA Encryption
S/MIME
Socket
Spider
Tar
Upload
XML
XMP
Zip Compression


More Examples...
Email Object
POP3
SMTP
RSS
Atom
Self-Extractor
Service
PPMD
Deflate
DH Key Exchange
DSA

Unreleased...
Bzip2
LZW
Bz2
Icon

 

 

 

 

 

 

 

 

.Z Format Unix Compress and Uncompress

Demonstrates how to use the CkUnixCompress C++ class to compress and uncompress .Z file format files and memory.

    // The CkUnixCompress class is included with the "Chilkat Zip" license.
    CkUnixCompress z;
    z.UnlockComponent("Anything for 30-day trial");

    // Uncompress a .Z file:
    z.UncompressFile("helloWorld.txt.Z","helloWorld.txt");

    // Create a .Z compressed file.
    z.CompressFile("helloWorld.txt","helloWorld2.txt.Z");

    CkByteData byteData;

    // Uncompress from file to memory:
    z.UncompressFileToMem("helloWorld.txt.Z",byteData);

    // Access the data:
    const unsigned char *data = byteData.getData();
    int numBytes = byteData.getSize();

    // Compress from memory to file:
    z.CompressMemToFile(byteData,"helloWorld3.txt.Z");

    // Memory-to-memory compress:
    CkByteData compressedData;
    z.CompressMemory(byteData,compressedData);

    // Access the compressed data:
    data = compressedData.getData();
    numBytes = compressedData.getSize();

    // Memory-to-memory uncompress
    byteData.clear();
    z.UncompressMemory(compressedData,byteData);

    // Uncompress from memory to file:
    z.UncompressMemToFile(compressedData,"helloWorld4.txt");

    // Compress from file to memory:
    compressedData.clear();
    z.CompressFileToMem("helloWorld4.txt",compressedData);

 

 

 

Need a specific example? Send a request to support@chilkatsoft.com

© 2000-2008 Chilkat Software, Inc. All Rights Reserved.

Mail Component · .NET Mail Component · XML Parser