]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkCompatibilityPkg/Sample/Tools/Source/Common/Compress.h
Add in the 1st version of ECP.
[mirror_edk2.git] / EdkCompatibilityPkg / Sample / Tools / Source / Common / Compress.h
diff --git a/EdkCompatibilityPkg/Sample/Tools/Source/Common/Compress.h b/EdkCompatibilityPkg/Sample/Tools/Source/Common/Compress.h
new file mode 100644 (file)
index 0000000..4353593
--- /dev/null
@@ -0,0 +1,90 @@
+/*++\r
+\r
+Copyright (c) 2004 - 2006, Intel Corporation                                              \r
+All rights reserved. This program and the accompanying materials                          \r
+are licensed and made available under the terms and conditions of the BSD License         \r
+which accompanies this distribution.  The full text of the license may be found at        \r
+http://opensource.org/licenses/bsd-license.php                                            \r
+                                                                                          \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+Module Name:\r
+\r
+  Compress.h\r
+\r
+Abstract:\r
+\r
+  Header file for compression routine.\r
+  Providing both EFI and Tiano Compress algorithms.\r
+  \r
+--*/\r
+\r
+#ifndef _COMPRESS_H_\r
+#define _COMPRESS_H_\r
+\r
+/*++\r
+\r
+Routine Description:\r
+\r
+  Tiano compression routine.\r
+\r
+--*/\r
+EFI_STATUS\r
+TianoCompress (\r
+  IN      UINT8   *SrcBuffer,\r
+  IN      UINT32  SrcSize,\r
+  IN      UINT8   *DstBuffer,\r
+  IN OUT  UINT32  *DstSize\r
+  )\r
+;\r
+\r
+/*++\r
+\r
+Routine Description:\r
+\r
+  Efi compression routine.\r
+\r
+--*/\r
+EFI_STATUS\r
+EfiCompress (\r
+  IN      UINT8   *SrcBuffer,\r
+  IN      UINT32  SrcSize,\r
+  IN      UINT8   *DstBuffer,\r
+  IN OUT  UINT32  *DstSize\r
+  )\r
+;\r
+\r
+/*++\r
+\r
+Routine Description:\r
+\r
+  The compression routine.\r
+\r
+Arguments:\r
+\r
+  SrcBuffer   - The buffer storing the source data\r
+  SrcSize     - The size of source data\r
+  DstBuffer   - The buffer to store the compressed data\r
+  DstSize     - On input, the size of DstBuffer; On output,\r
+                the size of the actual compressed data.\r
+\r
+Returns:\r
+\r
+  EFI_BUFFER_TOO_SMALL  - The DstBuffer is too small. In this case,\r
+                DstSize contains the size needed.\r
+  EFI_SUCCESS           - Compression is successful.\r
+  EFI_OUT_OF_RESOURCES  - No resource to complete function.\r
+  EFI_INVALID_PARAMETER - Parameter supplied is wrong.\r
+\r
+--*/\r
+typedef\r
+EFI_STATUS\r
+(*COMPRESS_FUNCTION) (\r
+  IN      UINT8   *SrcBuffer,\r
+  IN      UINT32  SrcSize,\r
+  IN      UINT8   *DstBuffer,\r
+  IN OUT  UINT32  *DstSize\r
+  );\r
+\r
+#endif\r