This paclet implements file and directory compression for various methods: Deflate, Bzip2, and ZStandard. Its default ZStandard compression method is 5-6x faster than the built-in system function CreateArchive. The implementation used agentic AI tools (Gemini Pro 3.1 and Gemini Flash 3.1) to create a LibraryLink binding to Rust’s zip crate. Paclet works on Windows and MacOS, and Linux is a work in progress. You can find the source code on GitHub.
To install this paclet in your Wolfram Language environment, evaluate this code:
In[]:=
PacletInstall["ArnoudBuzing/ZipLink"]
Out[]=
PacletObject
To load the code after installation, evaluate this code:
In[]:=
Needs["ArnoudBuzing`ZipLink`"]
Basic Examples
Basic Examples
Pick a directory to compress:
In[]:=
qu=FileNameJoin[$InstallationDirectory,"AddOns","Applications","QuantityUnits"];
List the files in this directory:
In[]:=
FileNames["*",qu,∞]
Out[]=
{/Applications/Wolfram/15.0/Wolfram.app/Contents/AddOns/Applications/QuantityUnits/Kernel,/Applications/Wolfram/15.0/Wolfram.app/Contents/AddOns/Applications/QuantityUnits/Kernel/QuantityUnitsLoader.m,/Applications/Wolfram/15.0/Wolfram.app/Contents/AddOns/Applications/QuantityUnits/Kernel/QuantityUnits.m,/Applications/Wolfram/15.0/Wolfram.app/Contents/AddOns/Applications/QuantityUnits/Kernel/QuantityVariables.m,/Applications/Wolfram/15.0/Wolfram.app/Contents/AddOns/Applications/QuantityUnits/Kernel/Typesetting.m,/Applications/Wolfram/15.0/Wolfram.app/Contents/AddOns/Applications/QuantityUnits/Kernel/UnitAliases.m,/Applications/Wolfram/15.0/Wolfram.app/Contents/AddOns/Applications/QuantityUnits/Kernel/UnitConversion.m,/Applications/Wolfram/15.0/Wolfram.app/Contents/AddOns/Applications/QuantityUnits/Kernel/UnitQFunctions.m,/Applications/Wolfram/15.0/Wolfram.app/Contents/AddOns/Applications/QuantityUnits/Kernel/UpValues.m,/Applications/Wolfram/15.0/Wolfram.app/Contents/AddOns/Applications/QuantityUnits/PacletInfo.m}
Create a zip file from the directory and its contents:
In[]:=
zip=[qu,"qu.zip"]
Out[]=
/Users/arnoudb/qu.zip
List the contents of the zip file with compression details:
In[]:=
Out[]=
Unzip the zip file in a temporary directory:
In[]:=
tmp=[zip,CreateDirectory[]]
Out[]=
/private/var/folders/2h/44nt1g317xz3vyzht44m7060000_nk/T/m000005808941
List the extracted files:
In[]:=
FileNames["*",tmp,∞]
Out[]=
{/private/var/folders/2h/44nt1g317xz3vyzht44m7060000_nk/T/m000005808941/Kernel,/private/var/folders/2h/44nt1g317xz3vyzht44m7060000_nk/T/m000005808941/Kernel/QuantityUnitsLoader.m,/private/var/folders/2h/44nt1g317xz3vyzht44m7060000_nk/T/m000005808941/Kernel/QuantityUnits.m,/private/var/folders/2h/44nt1g317xz3vyzht44m7060000_nk/T/m000005808941/Kernel/QuantityVariables.m,/private/var/folders/2h/44nt1g317xz3vyzht44m7060000_nk/T/m000005808941/Kernel/Typesetting.m,/private/var/folders/2h/44nt1g317xz3vyzht44m7060000_nk/T/m000005808941/Kernel/UnitAliases.m,/private/var/folders/2h/44nt1g317xz3vyzht44m7060000_nk/T/m000005808941/Kernel/UnitConversion.m,/private/var/folders/2h/44nt1g317xz3vyzht44m7060000_nk/T/m000005808941/Kernel/UnitQFunctions.m,/private/var/folders/2h/44nt1g317xz3vyzht44m7060000_nk/T/m000005808941/Kernel/UpValues.m,/private/var/folders/2h/44nt1g317xz3vyzht44m7060000_nk/T/m000005808941/PacletInfo.m}
Extract a specific file only:
In[]:=
Out[]=
/private/var/folders/2h/44nt1g317xz3vyzht44m7060000_nk/T/m000006808941/Kernel/QuantityUnits.m
CITE THIS NOTEBOOK
CITE THIS NOTEBOOK
New paclet - ZipLink: Zip file and directory compression via LibraryLink and Rust
by Arnoud Buzing
Wolfram Community, STAFF PICKS, March 26, 2026
https://community.wolfram.com/groups/-/m/t/3669610
by Arnoud Buzing
Wolfram Community, STAFF PICKS, March 26, 2026
https://community.wolfram.com/groups/-/m/t/3669610