Skip to content

viniciusdof/siir

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A minimal SII save file decryptor written in Zig. Supports save files from Euro Truck Simulator 2 and American Truck Simulator. Can be used as a CLI tool or embedded as a library in other applications.Mirror of (https://codeberg.org/viniciusdof/siir)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors