mirror of
https://github.com/LongSoft/UEFITool.git
synced 2025-05-13 22:54:47 -04:00
Rewrite VSS and VSS2 NVRAM variable parsers in KaitaiStruct
This commit is contained in:
parent
eec2a0bd7c
commit
a027a8edae
11 changed files with 1430 additions and 40 deletions
|
@ -369,8 +369,6 @@ USTATUS decompress(const UByteArray & compressedData, const UINT8 compressionTyp
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 8bit sum calculation routine
|
||||
UINT8 calculateSum8(const UINT8* buffer, UINT32 bufferSize)
|
||||
{
|
||||
|
@ -573,3 +571,12 @@ USTATUS zlibDecompress(const UByteArray& input, UByteArray& output)
|
|||
inflateEnd(&stream);
|
||||
return ret == Z_STREAM_END ? U_SUCCESS : U_ZLIB_DECOMPRESSION_FAILED;
|
||||
}
|
||||
|
||||
UString fourCC(const UINT32 value)
|
||||
{
|
||||
const UINT8 byte0 = (const UINT8)(value & 0xFF);
|
||||
const UINT8 byte1 = (const UINT8)((value & 0xFF00) >> 8);
|
||||
const UINT8 byte2 = (const UINT8)((value & 0xFF0000) >> 16);
|
||||
const UINT8 byte3 = (const UINT8)((value & 0xFF000000) >> 24);
|
||||
return usprintf("%c%c%c%c", byte0, byte1, byte2, byte3);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue