GMA
A crate to read and write to .gma files.
Reading/Writing lzma compressed files is supported. Garry's mod cant read compressed gma files but some when downloaded directly from the steam workshop some files are lzma compressed.
Reading a .gma file
let archive = open.unwrap;
println!;
println!;
println!;
println!;
println!;
println!;
println!;
println!;
println!;
println!;
for entry in archive.entries
Creating a .gma file
const VERSION: u8 = 3;
const STEAMID: u64 = 123456;
const TIMESTAMP: u64 = 987654;
const NAME: &str = "ADDON_NAME";
const DESC: &str = "ADDON_DESC";
const AUTHOR: &str = "AUTHOR_NAME";
const TYPE: AddonType = Model;
const TAG1: AddonTag = Build;
const TAG2: AddonTag = Fun;
let file = create.unwrap;
let mut writer = new;
let mut builder = new;
builder
.version
.steamid
.timestamp
.name
.description
.addon_type
.addon_tag
.addon_tag
.author
.file_from_bytes
.compression;
builder.write_to.unwrap;