Skip to content

Latest commit

 

History

History
72 lines (49 loc) · 1.65 KB

File metadata and controls

72 lines (49 loc) · 1.65 KB

siir

siir is a SCS/SII file decoder and decompressor written in Zig. It is designed to handle game files from SCS Software, such as Euro Truck Simulator 2 (ETS2) and American Truck Simulator (ATS).

This project provides both a command-line tool (CLI) and a library, allowing for easy integration into other projects.

🚀 Features

  • Decryption: Support for encrypted files with the ScsC signature.
  • Decompression: Support for zlib compressed data (signatures starting with 0x78).
  • Binary Decoding: Decodes binary SII files (signature BSII).
  • Format Detection: Automatically identifies 3nK, NSii (plain text), ScsC (encrypted), and BSII (binary) formats.

🛠️ Requirements

  • Zig: Version 0.15.1.
  • Just (optional): For easier build command execution.

📦 Installation and Compilation

To build the project from source:

Using Zig directly:

# Release build (optimized)
zig build -Doptimize=ReleaseSafe

# Debug build
zig build -Doptimize=Debug

Using Just:

# Build release version
just build-release

# Run tests
just test

# Format code
just format

The final executable will be generated in zig-out/bin/siir and the library in zig-out/lib/.

💻 CLI Usage

The CLI allows you to decode files and display the results in the terminal or save them to a file.

# Display help
siir --help

# Decode and print to terminal (stdout)
siir game.sii

# Decode and save to a specific file
siir game.sii -o decoded.sii

# Check version
siir --version

🧪 Testing

To ensure the integrity of the decoder, run the unit tests:

zig build test
# or
just test