The main issue want to be resolve is that some tools need EfiCompress and other tools need TianoCompress, but only common Compress(indeed is TianoCompress) is provided in tool/CCode/Common.
EfiCompress and TianoCompress are all originated from LZ77 algorithms and they have very little different, that different position set for Huffman code. EfiCompress is defined in EFI 1.1 spec and EfiRom tool need it to create a recognized compressed EFI driver. TianoCompress is for pursuer more size saving and it used be GenFfs and GenSection tools. So this patch: 1) Split EfiComress and TianoCompress in edkII’s tools 2) Change EfiRom tool use EfiCompress and GenFfs/GenSection use TianoCompress git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2064 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, Intel Corporation
|
||||
Copyright (c) 2004 - 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -11,24 +11,47 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name:
|
||||
|
||||
EfiCompress.h
|
||||
Compress.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Header file for compression routine
|
||||
Header file for compression routine.
|
||||
Providing both EFI and Tiano Compress algorithms.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _EFICOMPRESS_H
|
||||
#define _EFICOMPRESS_H
|
||||
#ifndef _COMPRESS_H_
|
||||
#define _COMPRESS_H_
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <Common/UefiBaseTypes.h>
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Tiano compression routine.
|
||||
|
||||
--*/
|
||||
EFI_STATUS
|
||||
Compress (
|
||||
TianoCompress (
|
||||
IN UINT8 *SrcBuffer,
|
||||
IN UINT32 SrcSize,
|
||||
IN UINT8 *DstBuffer,
|
||||
IN OUT UINT32 *DstSize
|
||||
)
|
||||
;
|
||||
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Efi compression routine.
|
||||
|
||||
--*/
|
||||
EFI_STATUS
|
||||
EfiCompress (
|
||||
IN UINT8 *SrcBuffer,
|
||||
IN UINT32 SrcSize,
|
||||
IN UINT8 *DstBuffer,
|
||||
@@ -55,6 +78,8 @@ Returns:
|
||||
EFI_BUFFER_TOO_SMALL - The DstBuffer is too small. In this case,
|
||||
DstSize contains the size needed.
|
||||
EFI_SUCCESS - Compression is successful.
|
||||
EFI_OUT_OF_RESOURCES - No resource to complete function.
|
||||
EFI_INVALID_PARAMETER - Parameter supplied is wrong.
|
||||
|
||||
--*/
|
||||
typedef
|
File diff suppressed because it is too large
Load Diff
1752
Tools/CCode/Source/Common/TianoCompress.c
Normal file
1752
Tools/CCode/Source/Common/TianoCompress.c
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user