miyako / 4d-plugin-zip

4D plugin to zip and unzip.
MIT License
4 stars 4 forks source link
4d-plugin

version platform license downloads

Note: for v17 and earlier, move manifest.json to Contents

see also 4d-plugin-archive

4d-plugin-zip

4D plugin to zip and unzip.

the previous version is under the classic-minizip branch

this version replaces the original madler/zlib/minizip with the nmoinvaz/minizip implementation

Features

success:=Zip (src;dst;pass;level;options;callback;codepage)
Parameter Type Description
src TEXT
dst TEXT
pass TEXT
level LONGINT
options LONGINT
callback TEXT
codepage LONGINT
result:=Unzip (src;dst;pass;options;callback;codepage)
Parameter Type Description
src TEXT
dst TEXT
pass TEXT
options LONGINT
callback TEXT
codepage LONGINT

Keep UNIX file attributes

You can archive apps, or any folder that contains symbolic links and files with RWX permissions, by passing ZIP_With_attributes (2) in options.

Exclude enclosing folder

Standard compression programs keep the top level folder in the relative path.

You can compress just the contents of a folder by passing ZIP_Without_enclosing_folder (4) in options.

About Unicode

The plugin will store the file paths in UTF-8 on both platforms.

You can safely unarchive such zip files using the plugin.

However, the Windows kernel on Windows 7 and Windows Server 2008 R2 assumes that the paths are stored in the current locale, so UTF-8 paths will be converted wrongly. There is a Microsoft Patch to correct this.

http://support.microsoft.com/kb/2704299