#archive #filesystem #compression #game #assets

vach

A simple archiving format, designed for storing assets in compact secure containers

10 releases

Uses new Rust 2021

0.3.6 May 4, 2022
0.3.5 Feb 10, 2022
0.3.2 Dec 30, 2021
0.2.3 Nov 23, 2021
0.1.3 Sep 11, 2021

#35 in Compression

Download history 33/week @ 2022-01-25 247/week @ 2022-02-01 452/week @ 2022-02-08 7/week @ 2022-02-15 16/week @ 2022-02-22 84/week @ 2022-03-01 4/week @ 2022-03-08 57/week @ 2022-03-15 40/week @ 2022-03-22 4/week @ 2022-03-29 45/week @ 2022-04-05 2/week @ 2022-04-12 6/week @ 2022-04-19 79/week @ 2022-04-26 171/week @ 2022-05-03 163/week @ 2022-05-10

419 downloads per month
Used in vach-cli

MIT license

91KB
1.5K SLoC

.vach logo

vach

A simple archiving format, designed for storing assets in compact secure containers

docs.rs Crate Version on Crates.io
GitHub GitHub Build and Test actions GitHub issues

Docs | Repo


vach, pronounced like "puck" but with a "v", is an archiving and resource transmission format. It was built to be secure, contained and protected. It was, in fact, designed by the SCP to keep your anomalous assets compact and secure during transmission. vach also has in-built support for multiple compression schemes (LZ4, Snappy and Brolti), data signing, leaf bitflags, encryption and some degree of archive customization. Check out the vach spec at spec.txt. Any and all help will be much appreciated, especially proof reading the docs and code review.

⛏ Who is this for?

  • You just released some software and don't want your assets pirated or easily read.
  • You want a simple convenient way to manage, decompress, decrypt and authenticate assets in distribution.
  • You want a pure Rust™️ archive format with no C bindings underneath (bindings for C may become available in the future).
  • You want your software to be neat, and all your assets to be in one neat secure container.
  • You like orbital cannons.

🧷 Simple usage

use std::fs::File;
use vach::prelude::{Archive, Resource, Flags};

let source = File::open("sounds.vach")?;

let archive = Archive::from_handle(source)?;
let resource: Resource = archive.fetch("footstep.wav")?;

// By default all resources are flagged as NOT secure
assert!(!resource.secured);

// Use the data
use my_crate::Sound;
println!("{}", Sound::new(resource.data.as_slice())?);

// Read data directly into an `io::Write` stream
let mut buffer = Vec::new();
let (flags, content_version, is_secure) = archive.fetch_write("ftstep", &mut buffer)?;

For more information on how to use the crate, read the documentation or pass by the repository. Maybe also check out the CLI, for a more user-friendly use of vach

Dependencies

~0.3–2.7MB
~65K SLoC