RedfishPkg[all]  1.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
RedfishContentCodingLib.h File Reference

Functions

EFI_STATUS RedfishContentEncode (IN CHAR8 *ContentEncodedValue, IN CHAR8 *OriginalContent, IN UINTN OriginalContentLength, OUT VOID **EncodedContentPointer, OUT UINTN *EncodedLength)
 
EFI_STATUS RedfishContentDecode (IN CHAR8 *ContentEncodedValue, IN VOID *ContentPointer, IN UINTN ContentLength, OUT VOID **DecodedContentPointer, OUT UINTN *DecodedLength)
 

Detailed Description

Definitinos of RedfishContentCodingLib.

(C) Copyright 2021 Hewlett Packard Enterprise Development LP

SPDX-License-Identifier: BSD-2-Clause-Patent

Function Documentation

EFI_STATUS RedfishContentDecode ( IN CHAR8 *  ContentEncodedValue,
IN VOID *  ContentPointer,
IN UINTN  ContentLength,
OUT VOID **  DecodedContentPointer,
OUT UINTN *  DecodedLength 
)

This is the function to decode the content use the algorithm indicated in ContentEncodedValue. The naming of ContentEncodedValue is follow HTTP spec or could be a platform-specific value.

Parameters
[in]ContentDecodedValueHTTP conent decoded value. The value could be one of below or any which is platform-specific.
  • HTTP_CONTENT_ENCODING_IDENTITY "identity"
  • HTTP_CONTENT_ENCODING_GZIP "gzip"
  • HTTP_CONTENT_ENCODING_COMPRESS "compress"
  • HTTP_CONTENT_ENCODING_DEFLATE "deflate"
  • HTTP_CONTENT_ENCODING_BROTLI "br"
[in]ContentPointerOriginal content.
[in]ContentLengthThe length of original content.
[out]DecodedContentPointerPointer to receive decoded content pointer.
[out]DecodedContentLengthLength of decoded content.
Return values
EFI_SUCCESSContent is decoded successfully.
EFI_UNSUPPORTEDNo supported decoding funciton,
EFI_INVALID_PARAMETEROne of the given parameter is invalid.
EFI_STATUS RedfishContentEncode ( IN CHAR8 *  ContentEncodedValue,
IN CHAR8 *  OriginalContent,
IN UINTN  OriginalContentLength,
OUT VOID **  EncodedContentPointer,
OUT UINTN *  EncodedLength 
)

This is the function to encode the content use the algorithm indicated in ContentEncodedValue. The naming of ContentEncodedValue is follow HTTP spec or could be a platform-specific value.

Parameters
[in]ContentEncodedValueHTTP conent encoded value. The value could be one of below or any which is platform-specific.
  • HTTP_CONTENT_ENCODING_IDENTITY "identity"
  • HTTP_CONTENT_ENCODING_GZIP "gzip"
  • HTTP_CONTENT_ENCODING_COMPRESS "compress"
  • HTTP_CONTENT_ENCODING_DEFLATE "deflate"
  • HTTP_CONTENT_ENCODING_BROTLI "br"
[in]OriginalContentOriginal content.
[in]OriginalContentLengthThe length of original content.
[out]EncodedContentPointerPointer to receive the encoded content pointer.
[out]EncodedContentLengthLength of encoded content.
Return values
EFI_SUCCESSContent is encoded successfully.
EFI_UNSUPPORTEDNo supported encoding funciton,
EFI_INVALID_PARAMETEROne of the given parameter is invalid.