https://github.com/mihaistreames/dvpl-converter
Encode and decode DVPL-compressed game assets with LZ4/LZ4-HC support, written in Rust.
https://github.com/mihaistreames/dvpl-converter
converter dvpl lz4 python script wotb wotblitz
Last synced: 3 months ago
JSON representation
Encode and decode DVPL-compressed game assets with LZ4/LZ4-HC support, written in Rust.
- Host: GitHub
- URL: https://github.com/mihaistreames/dvpl-converter
- Owner: MihaiStreames
- License: mit
- Created: 2026-04-16T13:12:22.000Z (3 months ago)
- Default Branch: master
- Last Pushed: 2026-04-16T18:28:50.000Z (3 months ago)
- Last Synced: 2026-04-16T18:31:21.542Z (3 months ago)
- Topics: converter, dvpl, lz4, python, script, wotb, wotblitz
- Language: Rust
- Homepage: https://crates.io/crates/dvpl-engine
- Size: 31.3 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# dvpl-converter
dvpl-converter encodes and decodes DVPL-compressed World of Tanks Blitz assets with [LZ4 and LZ4-HC](https://lz4.org) support. By default, it decodes, verifies [CRC32](https://en.wikipedia.org/wiki/Cyclic_redundancy_check) integrity, and writes output next to the input file. It ships as a Rust crate (`dvpl-engine`), a Python CLI installable via pip, and a single-file standalone script that only needs `lz4`.
[](https://crates.io/crates/dvpl-engine)
[](https://pypi.org/project/dvpl-converter)
[](https://github.com/MihaiStreames/dvpl-converter/actions/workflows/ci.yml)
[](LICENSE)
Licensed under MIT.
## About
Originally a 180-line script I wrote because I couldn't open Blitz's asset files for a side project. I wanted to learn [maturin](https://www.maturin.rs), so the script became a Rust engine bridged to Python through [PyO3](https://pyo3.rs). Mildly overkill for the job, but it's fast and it was fun to build.
### 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.
## Install
### pip
```sh
pip install dvpl-converter
```
### cargo
```sh
cargo add dvpl-engine
```
### Standalone script (only needs `lz4`)
```sh
pip install lz4
python standalone.py file.xml.dvpl
```
## Usage
```sh
dvpl-converter file.xml.dvpl # decode (default)
dvpl-converter -e file.xml # encode with LZ4-HC
dvpl-converter *.dvpl # batch
dvpl-converter -o out/ *.dvpl # output directory
```
| Flag | Short | Description |
| --------------- | ----- | ---------------------------------------------- |
| `--encode` | `-e` | Encode to DVPL (default is decode) |
| `--compression` | `-c` | `0` none, `1` LZ4, `2` LZ4-HC (default: `2`) |
| `--output-dir` | `-o` | Output directory |
## Rust API
```rust
use dvpl_engine::{decode, encode, COMP_LZ4_HC};
let blob = encode(b"hello DVPL", COMP_LZ4_HC)?;
let out = decode(&blob)?;
assert_eq!(out, b"hello DVPL");
```
Full API on [docs.rs/dvpl-engine](https://docs.rs/dvpl-engine).
## License
MIT. See [LICENSE](LICENSE).
Made with ❤️