ZipLink is a state-of-the-art Wolfram Language paclet that bridges the Wolfram ecosystem with the high-performance Rust zip ecosystem through LibraryLink. Engineered for speed and reliability, it provides an intuitive interface for managing archives with support for industry-standard compression methods like Deflate, Bzip2, and the ultra-fast ZStandard. Whether you are bundling large datasets for distribution or performing surgical extractions from complex directory structures, ZipLink delivers a seamless, native-level experience for archive management in Mathematica and Wolfram Desktop.
- Multi-Format Support: Deflate, Bzip2, and ZStandard (zstd) compression.
- Archive Inspection: List contents and metadata without extracting.
- Single File Extraction: Extract specific files from an archive.
- Recursive: Supports zipping entire directory structures.
- LibraryLink: High-performance Rust-to-WL integration.
To build the project, you need to have cargo (Rust) and wolframscript installed.
- Clone the repository (or enter the project directory).
- Run the build script:
wolframscript -file scripts/BuildPaclet.wl
PacletInstall["build/ZipLink-MacOSX-ARM64-1.0.0.paclet"]Creates a zip archive at dest containing the file or directory at source.
ZipLevel: Integer or Automatic.
"Deflate": 0 (least) to 9 (most). Default: 6.
"Bzip2": 0 (least) to 9 (most). Default: 6.
"ZStandard": -7 (least) to 22 (most). Default: 3.
None: Only Automatic is supported.
Tip
Performance: "ZStandard" is generally the fastest compression method while providing excellent compression ratios. Use "None" if you only need to bundle files without reducing their size. "Bzip2" is usually the slowest but can be very effective for large text-based data.
Extracts the entire contents of the zip archive at source into the directory at dest.
Returns a list of associations containing metadata for each file in the archive.
- Fields:
"FileName","Size","CompressedSize","CompressionMethod","CRC32".
Extracts a specific file (relative path in the archive) from the zip into the dest directory.
Needs["ZipLink`"]
(* Zip using ZStandard compression *)
Zip["my_data", "data.zip", ZipMethod -> "ZStandard"]
(* Inspect the archive *)
ZipInformation["data.zip"]
(* Extract just one file *)
ZipExtract["data.zip", "my_data/report.txt", "extracts"]Run the included unit tests using:
wolframscript -file scripts/RunTests.wlAll testing artifacts and temporary files are managed within the tests/ directory.