Backport decompression updates from new_engine

This commit is contained in:
vit9696 2018-05-08 19:22:07 +03:00
parent b3f7beb236
commit f507d71ead
11 changed files with 3296 additions and 3312 deletions

View file

@ -11,8 +11,8 @@
*/
#ifndef __LZMADECOMPRESS_H__
#define __LZMADECOMPRESS_H__
#ifndef LZMADECOMPRESS_H
#define LZMADECOMPRESS_H
#include "../basetypes.h"
#include "SDK/C/LzmaDec.h"
@ -23,13 +23,6 @@ extern "C" {
#define LZMA_HEADER_SIZE (LZMA_PROPS_SIZE + 8)
UINT64
EFIAPI
LShiftU64(
UINT64 Operand,
UINT32 Count
);
/*
Given a Lzma compressed source buffer, this function retrieves the size of
the uncompressed buffer and the size of the scratch buffer required
@ -57,12 +50,12 @@ extern "C" {
buffer was returned ScratchSize.
*/
INT32
EFI_STATUS
EFIAPI
LzmaGetInfo(
const VOID *Source,
UINTN SourceSize,
UINTN *DestinationSize
LzmaGetInfo (
CONST VOID *Source,
UINT32 SourceSize,
UINT32 *DestinationSize
);
/*
@ -84,15 +77,16 @@ extern "C" {
The source buffer specified by Source is corrupted
(not a valid compressed format).
*/
INT32
EFI_STATUS
EFIAPI
LzmaDecompress(
const VOID *Source,
UINTN SourceSize,
VOID *Destination
LzmaDecompress (
CONST VOID *Source,
UINT32 SourceSize,
VOID *Destination
);
#ifdef __cplusplus
}
#endif
#endif
#endif // LZMADECOMPRESS_H