Local Links

External Links


Search this site

Zip Archive classes for Xojo / Real Studio (TTsZipPackage)

The Zip Package is a set of classes for reading and writing .zip files on Mac OS X, Windows and Linux. For use with the cross platform development system Xojo.

Current version is: 3.7 from 16 Apr 2024

Trouble with e-CryptIt Engine 11.0? See below for a quick fix.

If you create Zip archives with this software, any Zip compatible software on any operating system will be able to unpack them (and if it doesn't then I'll fix that ASAP).

Why you'd choose this over other zip tools

These classes give you direct access to every item inside a zip file, allowing you to...

  • List all items in a zip file, with their names, sizes, dates and other attributes, enabling you to search and filter specific entries.
  • Add files from various places to the zip file, simply by providing their FolderItems.
  • Create epub files.
  • Create your own custom folder structure in the archive.
  • Add items to the zip file directly from memory. This means you can create the file data in a String and write it directly into the archive, without having to write it to a temporary file first.
  • Choose which items you want to extract from an archive.
  • Easily find out if the zip file contents are all inside a single folder, and extract only its contents, without the enclosing folder.
  • Update existing zip files, by adding, replacing and deleting items.
  • Compact zip files after deleting items in it.


  • No support for encrypted archives.
  • No support for files nor archives > 4GB (i.e. no Zip64 support).
  • No support for multi-segment archives.


  • Xojo or Real Studio Version 2011 or later
  • On Windows: The zlib DLL from http://www.zlib.net/ (free) or the Einhugur e-CryptIt plugin.
  • Tested to run on: Windows XP and 7, Mac OS X 10.4.11 and 10.6.5, Ubuntu 9.10

Main features

  • New in version 3: New class ZipFolderItem, making adding items and browsing the contents much easier, as it works just like RB's FolderItem class.
  • New in version 2: Does not require a plugin any more (but can still use the Einhugur e-CryptIt plugin for slightly better performance), using instead the free zlib library, which is even already pre-installed on OS X and Linux systems (you'll have to bundle it on Windows yourself, though).
  • Compress entire folders with just a few calls.
  • Make incremental backups of folder trees, updating only changed files while keeping multiple snapshots of your folder structure.
  • MacBinary support (for preserving Mac OS X's resource forks, particularly Alias files).
  • Compatible with PKZIP, Info-Zip, Aladdin Stuffit Zip, ZipIt, WinZip, etc.

Quick fix for Einhugur.com's "e-CryptIt Engine 11"

When you're using the Einhugur plugin with the Zip Archive classes, you will get a few compile errors for missing CRC32 and Crc16_MemoryBlock functions.

Version 11 of the Einhugur plugin has made these functions protected inside the module EinhugurChecksum.

So, in case of the missing CRC32 function, simply rename this line:

me.crc_ = CRC32(dataIn, me.crc_)

into this:

me.crc_ = EinhugurChecksum.CRC32(dataIn, me.crc_)

In case of the Crc16_MemoryBlock function call, where you cannot edit the source code because it's in an encrypted class, simply add this helper function to a module of your choice, thereby making the function globally available again:

Function Crc16_MemoryBlock(bytes as MemoryBlock, offset as Integer, length as Integer, crc as UInt16) as UInt16
    return EinhugurChecksum.Crc16_MemoryBlock (bytes, offset, length, crc)
End Function


The software license has changed with version 3.0 (as of Dec 8, 2010): The basic code may be used for free, while the use of the newly added ZipFolderItem class requires a license code when used in built (standalone) programs. The price for the license is US$ 35. (Purchase License here)

View the complete Readme file (includes release notes and instructions)

Download here (247 KB)

Previous versions

How to stay up-to-date

Click the orange RSS feed icon in the top right and bookmark the resulting page. That way, your RSS reader will inform you next time an update is made to this page. Alternatively, follow me on Twitter (see side bar) or subscribe to my blog at http://blog.tempel.org

See also

Andrew Lambert's zip code

Page last modified on 2024-04-16, 16:58 UTC (do)
Powered by PmWiki