how to use gzip.compressstring()
function using chilkat. the syntax is
bool CompressString(const char *inStr, const char *outCharset, CkByteData &outBytes);
// COMPRESSSTRING_END
// COMPRESSSTRINGTOFILE_BEGIN .but i dont know how to implement it in c++.
below is the code i tried to acheive the following but wasn't succeeded in it
CkGzip gzip;
bool success;
CkByteData data;
char buffer[100] = {0};
success = gzip.CompressString("helloworld", "utf8", data);
data = buffer;
cout << buffer;
if (success != true) {
printf("%s\n", gzip.lastErrorText());
return;
}
Note: i want "hello world" to be in compressed form as an output.