dvpl-engine 0.1.0

DVPL file format engine for World of Tanks Blitz
Documentation

Stars crates.io PyPI License

About The Project

DVPL is a compression format used by World of Tanks Blitz for game assets. This tool decodes DVPL files to their original form and encodes files back to DVPL with configurable compression (none, LZ4, or LZ4-HC).

  • Decode .dvpl files back to their original format
  • Encode files to DVPL with LZ4 or LZ4-HC compression
  • Batch convert multiple files at once
  • CRC32 integrity verification on decode
  • Native Rust engine with Python CLI

Built With

Getting Started

Python (PyPI)

pip install dvpl-converter

Rust (crates.io)

cargo add dvpl-engine
use dvpl_engine::decode;
use dvpl_engine::encode;
use dvpl_engine::COMP_LZ4_HC;

let original = b"Hello DVPL!";
let dvpl_blob = encode(original, COMP_LZ4_HC).unwrap();
let decoded = decode(&dvpl_blob).unwrap();
assert_eq!(original.as_slice(), &decoded);

Development

git clone https://github.com/MihaiStreames/dvpl-converter.git
cd dvpl-converter
maturin develop --release

Usage

# decode DVPL files (default)
dvpl-converter file.xml.dvpl

# encode files to DVPL
dvpl-converter -e file.xml

# batch convert
dvpl-converter *.dvpl

# custom output directory
dvpl-converter -o output/ file.xml.dvpl

All the Flags

Flag Short What it does
--encode -e Encode to DVPL (default is decode)
--compression -c Compression type: 0=none, 1=lz4, 2=lz4-hc (default: 2)
--output-dir -o Output directory

DVPL Format

A .dvpl file is a payload followed by a 20-byte footer:

Field Size Encoding
original_size 4 bytes little-endian
compressed_size 4 bytes little-endian
crc32 4 bytes little-endian
compression 4 bytes little-endian
magic 4 bytes DVPL

Compression types: 0 = none, 1 = LZ4, 2 = LZ4-HC.

License

MIT. Do whatever you want with it. See LICENSE for details.


Made with ❤️