Unzipping zips with Unicode Filenames
Question: I see your example code includes the ability to create a zip with Unicode filenames. Does your product support unzipping files with unicode filenames, such as Chinese? Answer: Yes, it can unzip files w/ Unicode names — assuming the .zip was correctly created. Your first test should be to unzip without trying anything differently. Check to see if the […]
(IOS/IPhone) Setting Zip.TempDir to the Documents Directory
The Chilkat Zip methods for writing a .zip will first write the zip to a temp file in the directory specified by the Zip.TempDir property, and then if successful, moved/renamed to the actual output file. The default value for zip.TempDir is “.” (the current working directory) and this is often a directory where it is not possible to create files. […]
Verify / Test a Zip Archive
Question: I need an easy way to verify that a zip downloaded, i.e test it, preferably without actually unzipping it to a directory. I couldn’t find any method like that – the files are small enough in the zip I could probably unzip them into memory. Is that pretty much the only way to do it short of actually unzipping […]
Delete Files from a Zip Archive
Question: “I’ve been trying out the ZIP package that you guys have and for the most part it’s great. I do however have a question about folder manipulation. What I would like to be able to do is individually remove files from the zip and if the directory is empty I would like to remove the directory from the zip […]
How to Add Comment to a Zip Entry?
Question: How do I go about adding text to the entry.comment field while zipping individual files? Answer: After appending files via the AppendFiles (or other append methods), you’ll have a zip object with N entries, each of which is a reference to a file that will be zipped when WriteZip is called (or WriteZipAndClose, or WriteExe, etc.). You can then […]
Zip DecryptPassword and EncryptPassword
Question: I’m confused about DecryptPassword and EncryptPassword. I want to encrypt the files I am emailing. I want the recipient to be required to enter a password when they try to open the zipped file. Do I EncryptPassword or DecryptPassword? Answer: Use DecryptPassword when using the Chilkat Zip component / library to open an encrypted zip. Use EncryptPassword when writing […]
VB.NET to Extract a File from one Zip Archive and Append it to Another Zip Archive
The following VB.NET code copies the contents of the nutrition.xml file (found in xml1.zip) to another pre-existing .zip named xml2.zip: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim zip1 As New Chilkat.Zip Dim success As Boolean success = zip1.UnlockComponent(“Anything for 30-day trial”) success = zip1.OpenZip(“xml1.zip”) Dim entry As Chilkat.ZipEntry entry = zip1.GetEntryByName(“nutrition.xml”) ‘ Assume the […]
Zip Compress JPG?
Question: May I know that which Zip method in your component could give the best compression? We are trying to Zip some JPEG, and perhaps could reduce the size by half or more. Answer: The JPG file format is already a compressed format, so usually very little is gained in trying to compress it — the result is a lot […]