Fix compressed flag not being applied to the items inside GZip and Zlib GUIDed sections

This commit is contained in:
Nikolaj Schlej 2023-01-28 21:56:01 -08:00
parent fa5d744aac
commit 507f884635
2 changed files with 4 additions and 1 deletions

View File

@ -135,6 +135,7 @@ typedef ptrdiff_t INTN;
#define COMPRESSION_ALGORITHM_LZMA_INTEL_LEGACY 6
#define COMPRESSION_ALGORITHM_LZMAF86 7
#define COMPRESSION_ALGORITHM_GZIP 8
#define COMPRESSION_ALGORITHM_ZLIB 9
// Item create modes

View File

@ -2904,7 +2904,8 @@ USTATUS FfsParser::parseGuidedSectionBody(const UModelIndex & index)
msg(usprintf("%s: decompression failed with error ", __FUNCTION__) + errorCodeToUString(result), index);
return U_SUCCESS;
}
algorithm = COMPRESSION_ALGORITHM_GZIP;
info += UString("\nCompression algorithm: GZip");
info += usprintf("\nDecompressed size: %Xh (%u)", (UINT32)processed.size(), (UINT32)processed.size());
}
@ -2916,6 +2917,7 @@ USTATUS FfsParser::parseGuidedSectionBody(const UModelIndex & index)
return U_SUCCESS;
}
algorithm = COMPRESSION_ALGORITHM_ZLIB;
info += UString("\nCompression algorithm: Zlib");
info += usprintf("\nDecompressed size: %Xh (%u)", (UINT32)processed.size(), (UINT32)processed.size());
}