Get access to over 100 FireMonkey cross platform samples for Android, IOS, OSX, Windows, and Linux!

AndroidAppmethodCode SnippetComponentDelphiFiremonkeyIOSOSXWindows

Create And Extract Zip Files In Delphi XE6 Firemonkey On Windows, OSX, Android, And IOS

| Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOS

Delphi XE6 Firemonkey Zip File Component | Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOSHumphrey. Hyunsoo Kim has a blog post up where he highlights the System.Zip unit which comes with Delphi XE6 Firemonkey. System.Zip.TZipFile was introduced in Delphi XE2 and it is basically a class for creating and extracting compressed ZIP files without any third party components required. I believe you should be able to use the TZipFile class on Android, IOS, Windows, and OSX. I did a test compile for Android and it compiled without any problems. The original blog post is in Korean so be sure to use Google Chrome to translate it for you. The blog post also gives a good run down of links to other third party ZIP compression components but most likely they will only run on Windows. I also found a helper class for TZipFile over on StackOverflow that implements updating a file within a ZIP archive as well so you can check that out too. System.Zip should also be available in AppMethod. Here is some sample code for using TZipFile from the StackOverflow page:
ZipFile: TZipFile;
SS: TStringStream;
ZipDocument = 'E:\';
ZipFile := TZipFile.Create; //Zipfile: TZipFile
SS := TStringStream.Create('hello');
if FileExists(ZipDocument) then
ZipFile.Open(ZipDocument, zmReadWrite)
ZipFile.Open(ZipDocument, zmWrite);

ZipFile.Add(SS, 'document.txt');


Head over and check out the full blog post about TZipFile for Delphi XE6 Firemonkey.

Have Delphi Firemonkey questions? Ask and get answers on StackOverflow.

Related posts

AutoBlogAI: FireMonkey Client To Leverage LLMs And Generative AI For Blogging


Unleashing Creativity With Song Writer AI: A Deep Dive


How To Build Stable Diffusion Text To Image Prompts


FireMonkey 10.4.2 Features Updated iOS 14, Android 11, And macOS 11 Support Plus Hundreds Of Fixes

Sign up for our Newsletter and
stay informed

Leave a Reply