pub fn decompile(fafb_bytes: &[u8]) -> Result<DecompiledFafb, FafbError>Expand description
Decompile .fafb v2 binary bytes into a structured representation.
Parses header, section table, and string table. FAFb v1 binaries are
rejected (IncompatibleVersion) — re-compile from the .faf source.
§Example
use faf_fafb::{compile, decompile, CompileOptions};
let yaml = "faf_version: 2.5.0\nproject:\n name: test\n";
let opts = CompileOptions { use_timestamp: false };
let fafb_bytes = compile(yaml, &opts).unwrap();
let result = decompile(&fafb_bytes).unwrap();
assert_eq!(result.header.version_major, 2);
let project = result.get_section_string_by_name("project").unwrap();
assert!(project.contains("test"));