Skip to content

LambdaEd1th/dzip-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dzip-rs

Rust CI

A high-performance Rust implementation of the Dzip archive format tool. This project provides both a robust core library (dzip-core) and a feature-rich command-line interface (dzip-cli) for handling Dzip archives.

Features

  • High Performance: Built with Rust and optimized for speed.
  • Parallel Processing: Utilizes multi-threading (rayon) for packing, unpacking, and verification, ensuring maximum throughput.
  • Multi-Volume Support: Seamlessly handles split archives (e.g., archive.dz, archive01.dz, ...).
  • Compression Support:
    • Cloud/Distributed: Zlib, Bzip2, LZMA.
    • Specialized: Zero (Run-length), Copy (Store), Combuf.
  • Robust Verification: Integrity checking for all chunks, including cross-validation of chunk headers and data.
  • User Friendly:
    • Progress bars for long-running operations.
    • Automatic config generation (pack.toml) during unpacking for easy repackaging.

Installation

Pre-built binaries are available on the Releases page.

To build from source, ensure you have Rust installed.

# Clone the repository
git clone https://github.com/LambdaEd1th/dzip-rs.git
cd dzip-rs

# Build release version
cargo build --release

The executable will be located at target/release/dzip-cli.

Usage

Unpack

Extracts an archive to a specified directory.

dzip-cli unpack <INPUT_FILE> [OUTPUT_DIR]

Example:

dzip-cli unpack game_data.dz ./extracted_data
  • Helper: Generates a game_data.toml in the output directory, which can be used to repack the files later.

Verify

Verifies the integrity of an archive.

dzip-cli verify <INPUT_FILE>

Example:

dzip-cli verify game_data.dz
  • Displays a detailed table of all chunks, including their status (OK/FAIL), size, compression method, and path.
  • checks all split volumes if present.

Pack

Creates a Dzip archive from a configuration file.

dzip-cli pack <CONFIG_FILE> [-o OUTPUT_DIR]

Example:

dzip-cli pack extracted_data/game_data.toml -o ./new_build
  • Reads the TOML config (generated by unpack or created manually).
  • Compresses files in parallel.
  • Writes the .dz file (and volumes if configured) to the output directory.

Configuration Format (pack.toml)

The configuration file controls the packing process.

# List of output archive names (Volume 0, Volume 1, ...)
archives = ["archive.dz", "archive01.dz"]

# Base directory for source files (optional, defaults to config file location)
base_dir = "./src_data"

# File entries
[[files]]
path = "Images/logo.bmp"     # Relative to base_dir
compression = "Zlib"         # Method: Zlib, Bzip, Lzma, Copy, Zero
archive_file_index = 0       # Which volume to store this file in (0-based)

[[files]]
path = "Data/text.txt"
compression = "Bzip"
archive_file_index = 1       # Store in second volume

Supported Platforms

dzip-rs is fully cross-platform and tested on:

  • Windows: x86_64, ARM64 (Windows on ARM)
  • macOS: x86_64 (Intel), Apple Silicon (M1/M2/M3)
  • Linux: x86_64, ARM64

License

This project is licensed under the GNU General Public License v3.0 (GPLv3). See the LICENSE file for details.

About

A modern CLI and library to unpack, list, and repack Marmalade SDK resource archives. Built with Rust for speed and safety.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors