MdeModulePkg BrotliLib: Rename function with the specific lib name
[mirror_edk2.git] / MdeModulePkg / Library / BrotliCustomDecompressLib / BrotliDecompressLibInternal.h
1 /** @file
2 BROTLI UEFI header file
3
4 Allows BROTLI code to build under UEFI (edk2) build environment
5
6 Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.<BR>
7 This program and the accompanying materials
8 are licensed and made available under the terms and conditions of the BSD License
9 which accompanies this distribution. The full text of the license may be found at
10 http://opensource.org/licenses/bsd-license.php
11
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14
15 **/
16
17 #ifndef __BROTLI_DECOMPRESS_INTERNAL_H__
18 #define __BROTLI_DECOMPRESS_INTERNAL_H__
19
20 #include <PiPei.h>
21 #include <Library/BaseLib.h>
22 #include <Library/BaseMemoryLib.h>
23 #include <Library/DebugLib.h>
24 #include <Library/ExtractGuidedSectionLib.h>
25 #include <common/types.h>
26 #include <dec/decode.h>
27
28 typedef struct
29 {
30 VOID *Buff;
31 UINTN BuffSize;
32 } BROTLI_BUFF;
33
34 #define FILE_BUFFER_SIZE 65536
35 #define BROTLI_INFO_SIZE 8
36 #define BROTLI_DECODE_MAX 8
37 #define BROTLI_SCRATCH_MAX 16
38
39 #define memcpy CopyMem
40 #define memmove CopyMem
41 #define memset(dest,ch,count) SetMem(dest,(UINTN)(count),(UINT8)(ch))
42
43 VOID *
44 BrDummyMalloc (
45 IN size_t Size
46 );
47
48 VOID
49 BrDummyFree (
50 IN VOID * Ptr
51 );
52
53 EFI_STATUS
54 EFIAPI
55 BrotliUefiDecompressGetInfo (
56 IN CONST VOID *Source,
57 IN UINT32 SourceSize,
58 OUT UINT32 *DestinationSize,
59 OUT UINT32 *ScratchSize
60 );
61
62 EFI_STATUS
63 EFIAPI
64 BrotliUefiDecompress (
65 IN CONST VOID *Source,
66 IN UINTN SourceSize,
67 IN OUT VOID *Destination,
68 IN OUT VOID *Scratch
69 );
70
71 #endif