mirror of
https://github.com/open-goal/jak-project
synced 2026-08-04 17:19:49 -04:00
move dgo decompression to common utils and support it in the dgo unpacker (#312)
This commit is contained in:
@@ -20,6 +20,13 @@ int main(int argc, char** argv) {
|
||||
printf("Unpacking %s\n", base.c_str());
|
||||
// read the file
|
||||
auto data = file_util::read_binary_file(file_name);
|
||||
if (file_util::dgo_header_is_compressed(data)) {
|
||||
printf(" Detected compressed dgo, decompressing...\n");
|
||||
auto original_size = data.size();
|
||||
data = file_util::decompress_dgo(data);
|
||||
printf(" Decompressed from %d to %d bytes (%.2f%% compression)\n", int(original_size),
|
||||
int(data.size()), 100.f * original_size / data.size());
|
||||
}
|
||||
// read as a DGO
|
||||
auto dgo = DgoReader(base, data);
|
||||
// write dgo description
|
||||
|
||||
Reference in New Issue
Block a user