login about faq

I just upgraded to 9.4.1, and the functions (e.g. inflateToString) I used to use to unzip into a string no longer exist. The function used in the example program also doesn't exist.

I suppose that CkZipEntry.UnzipToString or unzipToString are the methods I need to use, but the meaning of the parameters for those functions is not documented.

Please give me information on how to call those methods. (Using C++ libraries)

asked Jul 27 '13 at 19:25

Jon%20Hilbert's gravatar image

Jon Hilbert

edited Jul 27 '13 at 19:26

Sorry about that. As with all Chilkat C++ methods returning a string there are two forms, the uppercase and lowercase:

bool CkZipEntry::UnzipToString(int lineEndingBehavior, const char *srcCharset, CkString &outStr);
const char *CkZipEntry::unzipToString(int lineEndingBehavior, const char *srcCharset)

The lineEndingBehavior is as follows:

0 = leave unchanged.
1 = convert all to bare LF's
2 = convert all to CRLF's

The srcCharset arg tells the component how to interpret the bytes of the uncompressed file -- i.e. as utf-8, utf-16, windows-1252, etc.


answered Jul 27 '13 at 21:13

chilkat's gravatar image

chilkat ♦♦

Thanks for the help. On followup: before getting your answer I tried calling the method passing in 0 for both arguments. It seems to work :) What is the effect of passing 0 (NULL) as the srcCharset argument?


answered Jul 28 '13 at 14:23

Jon%20Hilbert's gravatar image

Jon Hilbert

Passing null to srcCharset will result in "ANSI" being used, which is the ANSI multibyte charset based on the locale of the computer.

(Jul 29 '13 at 12:53) chilkat ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Jul 27 '13 at 19:25

Seen: 1,060 times

Last updated: Jul 29 '13 at 12:53

powered by OSQA