From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) by mx.groups.io with SMTP id smtpd.web10.6913.1614065962476534441 for ; Mon, 22 Feb 2021 23:39:22 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=O5d5VyMG; spf=pass (domain: hpe.com, ip: 148.163.147.86, mailfrom: prvs=06885caa36=nickle.wang@hpe.com) Received: from pps.filterd (m0150242.ppops.net [127.0.0.1]) by mx0a-002e3701.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 11N7cLoW016472 for ; Tue, 23 Feb 2021 07:39:22 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pps0720; bh=R8t7RrqXRrNT8uEug9di3xfr1n2c+5tHYjj+rH6dHB0=; b=O5d5VyMGf/I3iCvf7z4+R2kZIUs3kChwAmDeUUed7TTZ+sz+37YDr8WC+9BaFvGxanGc o1WuEKQKFfELEfdmSnZOmRbC0Rdi4Tenn0G+LWfkza2ZMgA8fMVT1QttSlJWuMBG05MC BscdQaxPktsKwXfzX8LVYuA92ulyt9jwHeTRJBy2XSYVpJ5Zw6eD1AIBr35h3JPzatsM Su1RWX4PxgX8KznDVfWUIgwCoZs3XRgx7GF7Nwibx6Gq8ZD8C5mZq7hZIV/l1bit6PFO 4rH02aTS9i70GAD8A2m+L4htVj9r6LI0vPgvfo1UrjML69hNhd9GjXTbZr/FE9+Co0uj qA== Received: from g9t5009.houston.hpe.com (g9t5009.houston.hpe.com [15.241.48.73]) by mx0a-002e3701.pphosted.com with ESMTP id 36uchxf8yj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 23 Feb 2021 07:39:21 +0000 Received: from G9W8453.americas.hpqcorp.net (exchangepmrr1.us.hpecorp.net [16.216.160.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by g9t5009.houston.hpe.com (Postfix) with ESMTPS id 3879A65 for ; Tue, 23 Feb 2021 07:39:21 +0000 (UTC) Received: from G4W9121.americas.hpqcorp.net (2002:10d2:1510::10d2:1510) by G9W8453.americas.hpqcorp.net (2002:10d8:a0d3::10d8:a0d3) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 23 Feb 2021 07:39:21 +0000 Received: from NAM02-CY1-obe.outbound.protection.outlook.com (15.241.52.12) by G4W9121.americas.hpqcorp.net (16.210.21.16) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Tue, 23 Feb 2021 07:39:21 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UiDXDnY10bnf+MiKi+FUOC4jZ/1sLHfmiSz40CZfBLxyj64IW1XFEW9JfHvrhYZ7hnZZnqNN5Qj5xhq/0Sz0tN6KgMZjvcNp5UZ3Al98Y5ABA1pZ8gX7OtEEYJ7ZcYL6cQcmTbiOijTILx5YNhE4+xxRT8f441an6PQWnNiYlDmQxiB4FxnV6rsbtzrF4p47jif3+nJNJ0dpEIlQpb8gh4TLAc38Gg0IWB+l0tTAPDHNGDwqqP9Nk4jd4cDK7QDjXTok0upV51xUqdCo3esQaZmKH2A6NACZbzaOrtxTEiL0Xw7YqC9Fn18gGS0Mbw1hUlZ495hDjvswmL4dGxUwRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2pIgbFAcZ61Ppm24LCDPugbOafwtlLp84LAdRN6Bn8A=; b=dSARHiv5EfMSvE3QIUeiagbJxq+ib/+lHFDAl7faHvZYs2Uip7cJJJP8wqs7pOuN2HUGwnPKolm6K3xQs9Hx5UnUFoTCv8yJOvbiDWn4rc9rcWCV2mbXPWTRhrcwH7KGGLMZjHiaOOtg1QKL7MP85CcY3jaq9Nua9q7e6rdWJZwwP1I70znBj0D4zYmPRaCtkFk8j8WKAH0cZ2A/CLT4uDi4alQSmHeTKl7J2PAYcetbDclkR12UIkIrQm0fWNPg9K18cQEQhGvZ+GCFy2CLcIogrSGhh58nynjBI17cg4+gn3dix43oTXA4HaBzpZLCBy/NIM1etzxtvZSrjs37qw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=hpe.com; dmarc=pass action=none header.from=hpe.com; dkim=pass header.d=hpe.com; arc=none Received: from DF4PR8401MB0812.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:760d::7) by DF4PR8401MB0715.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:760c::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3868.29; Tue, 23 Feb 2021 07:39:19 +0000 Received: from DF4PR8401MB0812.NAMPRD84.PROD.OUTLOOK.COM ([fe80::c1ae:b73d:dbaa:9a6e]) by DF4PR8401MB0812.NAMPRD84.PROD.OUTLOOK.COM ([fe80::c1ae:b73d:dbaa:9a6e%9]) with mapi id 15.20.3868.033; Tue, 23 Feb 2021 07:39:19 +0000 From: "Nickle Wang" To: "devel@edk2.groups.io" , "Chang, Abner (HPS SW/FW Technologist)" CC: Ray Ni , Michael D Kinney Subject: Re: [edk2-devel] [PATCH] RedfishPkg/RedfishContentCodingLib: EDKII Redfish En/Decode library Thread-Topic: [edk2-devel] [PATCH] RedfishPkg/RedfishContentCodingLib: EDKII Redfish En/Decode library Thread-Index: AQHW7VCplcz8vnUqqUa0lZQwSfRCqqplk0FQ Date: Tue, 23 Feb 2021 07:39:19 +0000 Message-ID: References: <165B3874796C21EF.15753@groups.io> In-Reply-To: <165B3874796C21EF.15753@groups.io> Accept-Language: zh-TW, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=hpe.com; x-originating-ip: [16.242.247.139] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 76a7b649-dc85-4c44-8dbf-08d8d7ce2136 x-ms-traffictypediagnostic: DF4PR8401MB0715: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:335; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: bTgp8eW/MAJD3KaR+nhrwQf4Hl+yc7cr+ise3yM+nYkiRp6PZxIASjrOP4db1luqnjOg/AQV6gvapiQVW9cbsbLnIDrnEXKEUAjaMSQyH52dvMwLkah17/pu7izQrlgWOsbVAl9MReiT22qV3jsLqckWvHagQ+7r7ymax58SLFtvFVURUKaZQJxzNNM/3KguXnYMdIPQI+/9AR0Sk/RDqZqnC137tVtS44sZ95UTPka+ypnaO/xYTdFO5dNi/g8NxbEi1f20TlBXDdVr6Y3/dGUDcnPolNAU/DymIWroH7C55ALig/5GGCJFU7b++0OkJGzhAN/dXWPS8+TAmj41OOWmSMctIjZr1VqL0YVXV3tu6JYhKUFMbrLXxKWtWrujcAUSzYU3TdgfS9bbaeaqQNFPmDm1wz5uR0vXaRKlt6lMPRTzZlCI/T5l4DoxUQuuJxXEI4A+gfOF8fyfuEri/jjEUp8HPcK9MRIVDho12kLdwk5BZUMios30cserSvSoqhekADM2n4n+E2vjqkZS2WrOzESGI2u3h/B34q6avNtI6h69M7XiPkSo57kjwYd2gIFmu6XQX0sMG0ISFGYUez06jOs2uMPo5L1gbNAGu6k= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DF4PR8401MB0812.NAMPRD84.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(39860400002)(136003)(366004)(376002)(396003)(346002)(76116006)(55016002)(64756008)(86362001)(66476007)(66946007)(8936002)(66556008)(26005)(9686003)(4326008)(54906003)(186003)(110136005)(19627235002)(6636002)(316002)(5660300002)(33656002)(83380400001)(8676002)(478600001)(66446008)(966005)(30864003)(71200400001)(53546011)(52536014)(6506007)(2906002)(7696005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?wzFNlHJpQRlHFnMmm8kYg5ZWWtJLbvgSGXL7SHKpETzcn7OpXIzLj/Vd1yrq?= =?us-ascii?Q?yDJgib3deaS3rfuL1j3T8X7odIVianU4eu0+xHlxz7lr7Z2H8YJgC5JgHzo+?= =?us-ascii?Q?gteMSHcdpgAVmOiOZCXXq6VtTyhwfSBpJLz/wgTlL2dwrW47WAZ/+fORJVFq?= =?us-ascii?Q?vok6bZa/tPWikN1DxN6vVWo+U2bsEntNVP0rpVSpiNb0oLo97FeLmQ4s/nkq?= =?us-ascii?Q?HkJ1rt0h7icw2RmmPvPGUfas4ySyfLEhsOosYB0v2wuMHr0OcPxG8dZv0RJC?= =?us-ascii?Q?VRy/FYgBA3iuMsxJmyIemI24iwbFc8yqQ38wW0Nig65i/92CohglD7IErMno?= =?us-ascii?Q?ppBxXjC2KF64yYsJmEnZB1JhFDn3eJE9NzOtZ7rYl2NBMjXN6KG3QnOwwfut?= =?us-ascii?Q?FJc2BFjpH34hCffejHj+R2zk5XTfAPoAmC+tgLo4W/sy/uIZKUmFFFV7mhiA?= =?us-ascii?Q?w21UGw+FnbmRZJoqpk3qw4fl8C3dZyYBspsW7FqgSe4H7wShKzLKHRRG22vu?= =?us-ascii?Q?CVL3hENoNbjjfjdmCkI7deTUUoMbu5Jp0tJFyqS541BUfg6Oi+dQ3t/T7VIk?= =?us-ascii?Q?bkV/5LhUg3j0Sw/g/Ygj7i0YYcerGbE5TmK0i1KuTHrl943VMQ6FoNfIbVFL?= =?us-ascii?Q?bovULOrQvPsdgHMETWDnQ/zegj0uyrBjD4M8hgPm5ZHg/iKy4PEpQQhsY/05?= =?us-ascii?Q?ZZaOWqh2pFJ5sTcYgR2Cg0NMeoX6CwWI2mSBnO5GheCVQRSsd3vMAYkm1u5f?= =?us-ascii?Q?eIdo44Ai11ztxs0UNQ8+fMTlLVZzdrYFRkRcEkhCQzyCRrjiO0E+AHV+EJZ0?= =?us-ascii?Q?M1dJKNDRI79YiiKoc7wHI4VUCfd7TLVlDKf+T6ESQt4JKPwe6L82WJyFDFpX?= =?us-ascii?Q?G72f5aWBZa9aT/vpapT8SAlDnphM9Xf8MJRj/r1FN+PLCnt9rLITI16maoDR?= =?us-ascii?Q?fS3XT4ncaSWDrR/2zcMA9itFG5YkyN5YOTMIjKlCMivFyKZ+KDmHTYgmaje8?= =?us-ascii?Q?Thq242TrX9QY1VKEqd707UJiyj8iuq62iabDJ6rovCQL8x6+lXaW0IwEbLKg?= =?us-ascii?Q?cS3Y7spSYP+lOxYlHapZVL2ZFiFB7gi61qq0vitrj1xRUAYv4u/nnkNAcHUx?= =?us-ascii?Q?LHwchyPPyh5sA/CRoReJAhI/2uaB1to8KObDrRS1qysh5HsEu5j35w0knhiG?= =?us-ascii?Q?wKj6+fbz3Q+WtgDaZ2Vr0iZZYv7oPSm316Pi5JatgyVoQcKy4DaIHLSV14e5?= =?us-ascii?Q?X2N4Bqx2KBkba+s9QJ8PCWQohCgT+hoQwa0tlLLXXgkrgo0yCfwu+CgX4JDk?= =?us-ascii?Q?vubmNSeduDMtzsFu42BMc4qf?= X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DF4PR8401MB0812.NAMPRD84.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 76a7b649-dc85-4c44-8dbf-08d8d7ce2136 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Feb 2021 07:39:19.1704 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: qPGf4c1q7WWxm6nHgxs/qpuBv8SbvRBmVdL8xh0k9VXn1S4fnEmQP1ZIgOgxKnKWYFQB++0nyzggcmYHfl1mWQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DF4PR8401MB0715 X-OriginatorOrg: hpe.com X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369,18.0.761 definitions=2021-02-23_02:2021-02-22,2021-02-23 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 adultscore=0 mlxscore=0 bulkscore=0 priorityscore=1501 lowpriorityscore=0 suspectscore=0 mlxlogscore=999 spamscore=0 clxscore=1015 malwarescore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102230064 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Nickle Wang Thanks, Nickle > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Chang, > Abner (HPS SW/FW Technologist) > Sent: Monday, January 18, 2021 11:28 AM > To: devel@edk2.groups.io > Cc: Wang, Nickle (HPS SW) ; Ray Ni > ; Michael D Kinney > Subject: [edk2-devel] [PATCH] RedfishPkg/RedfishContentCodingLib: EDKII > Redfish En/Decode library >=20 > BZ#:3174 > Platform library to provide the encoding/decoding algorithms for > the Redfish packets. > The supported 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" >=20 > Signed-off-by: Abner Chang > Cc: Nickle Wang > Cc: Ray Ni > Cc: Michael D Kinney > --- > RedfishPkg/RedfishPkg.dec | 7 +- > RedfishPkg/RedfishPkg.dsc | 4 +- > .../RedfishContentCodingLibNull.inf | 31 +++++++ > .../Include/Library/RedfishContentCodingLib.h | 78 ++++++++++++++++++ > .../RedfishContentCodingLibNull.c | 81 +++++++++++++++++++ > 5 files changed, 199 insertions(+), 2 deletions(-) > create mode 100644 > RedfishPkg/Library/RedfishContentCodingLibNull/RedfishContentCodingLib > Null.inf > create mode 100644 RedfishPkg/Include/Library/RedfishContentCodingLib.h > create mode 100644 > RedfishPkg/Library/RedfishContentCodingLibNull/RedfishContentCodingLib > Null.c >=20 > diff --git a/RedfishPkg/RedfishPkg.dec b/RedfishPkg/RedfishPkg.dec > index 2985676b60..016d0e87d3 100644 > --- a/RedfishPkg/RedfishPkg.dec > +++ b/RedfishPkg/RedfishPkg.dec > @@ -2,7 +2,7 @@ > # Redfish Package > # > # Copyright (c) 2019, Intel Corporation. All rights reserved.
> -# (C) Copyright 2020 Hewlett Packard Enterprise Development LP
> +# (C) Copyright 2021 Hewlett Packard Enterprise Development LP
> # > # SPDX-License-Identifier: BSD-2-Clause-Patent > ## > @@ -50,6 +50,11 @@ > # > JsonLib|Include/Library/JsonLib.h >=20 > + ## @libraryclass Provides the library functions to encode/decode > + # Redfish packet. > + # > + RedfishContentCodingLib|Include/Library/RedfishContentCodingLib.h > + > [LibraryClasses.Common.Private] > ## @libraryclass Provides the private C runtime library functions. > # CRT library is currently used by edk2 JsonLib (open source > diff --git a/RedfishPkg/RedfishPkg.dsc b/RedfishPkg/RedfishPkg.dsc > index bffa8f1f89..2cae8a46d8 100644 > --- a/RedfishPkg/RedfishPkg.dsc > +++ b/RedfishPkg/RedfishPkg.dsc > @@ -2,7 +2,7 @@ > # Redfish Package > # > # Copyright (c) 2019, Intel Corporation. All rights reserved.
> -# (C) Copyright 2020 Hewlett-Packard Enterprise Development LP. > +# (C) Copyright 2021 Hewlett-Packard Enterprise Development LP. > # > # SPDX-License-Identifier: BSD-2-Clause-Patent > # > @@ -37,6 +37,7 @@ > NetLib|NetworkPkg/Library/DxeNetLib/DxeNetLib.inf > DpcLib|NetworkPkg/Library/DxeDpcLib/DxeDpcLib.inf >=20 > RedfishPlatformCredentialLib|RedfishPkg/Library/PlatformCredentialLibNul= l/ > PlatformCredentialLibNull.inf > + > RedfishContentCodingLib|RedfishPkg/Library/RedfishContentCodingLibNull/ > RedfishContentCodingLibNull.inf >=20 > [LibraryClasses.ARM, LibraryClasses.AARCH64] > # > @@ -49,6 +50,7 @@ > [Components] >=20 > RedfishPkg/Library/PlatformHostInterfaceLibNull/PlatformHostInterfaceLib= N > ull.inf > RedfishPkg/Library/PlatformCredentialLibNull/PlatformCredentialLibNul= l.inf > + > RedfishPkg/Library/RedfishContentCodingLibNull/RedfishContentCodingLib > Null.inf > RedfishPkg/Library/DxeRestExLib/DxeRestExLib.inf > RedfishPkg/Library/BaseUcs2Utf8Lib/BaseUcs2Utf8Lib.inf > RedfishPkg/PrivateLibrary/RedfishCrtLib/RedfishCrtLib.inf > diff --git > a/RedfishPkg/Library/RedfishContentCodingLibNull/RedfishContentCodingLi > bNull.inf > b/RedfishPkg/Library/RedfishContentCodingLibNull/RedfishContentCodingLi > bNull.inf > new file mode 100644 > index 0000000000..d8c5cb583e > --- /dev/null > +++ > b/RedfishPkg/Library/RedfishContentCodingLibNull/RedfishContentCodingLi > bNull.inf > @@ -0,0 +1,31 @@ > +## @file > +# NULL instance of RedfishContentCodingLibNull > +# This library is used to encode/decode Redfish payload. > +# > +# (C) Copyright 2021 Hewlett Packard Enterprise Development LP
> +# > +# SPDX-License-Identifier: BSD-2-Clause-Patent > +# > +## > + > +[Defines] > + INF_VERSION =3D 0x0001000b > + BASE_NAME =3D RedfishContentCodingLibNull > + FILE_GUID =3D 06B10249-4D38-FF37-0CA5-13AFB6D625= CC > + MODULE_TYPE =3D DXE_DRIVER > + VERSION_STRING =3D 1.0 > + LIBRARY_CLASS =3D RedfishContentCodingLib > + > +# > +# VALID_ARCHITECTURES =3D IA32 X64 ARM AARCH64 RISCV64 > +# > + > +[Sources] > + RedfishContentCodingLibNull.c > + > +[Packages] > + MdePkg/MdePkg.dec > + MdeModulePkg/MdeModulePkg.dec > + RedfishPkg/RedfishPkg.dec > + > + > diff --git a/RedfishPkg/Include/Library/RedfishContentCodingLib.h > b/RedfishPkg/Include/Library/RedfishContentCodingLib.h > new file mode 100644 > index 0000000000..71a8adcb26 > --- /dev/null > +++ b/RedfishPkg/Include/Library/RedfishContentCodingLib.h > @@ -0,0 +1,78 @@ > +/** @file > + Definitinos of RedfishContentCodingLib. > + > + (C) Copyright 2021 Hewlett Packard Enterprise Development LP
> + > + SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ > +#ifndef REDFISH_CONTENT_CODING_LIB_H_ > +#define REDFISH_CONTENT_CODING_LIB_H_ > + > +/** > + 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. > + > + @param[in] ContentEncodedValue HTTP 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" > + @param[in] OriginalContent Original content. > + @param[in] OriginalContentLength The length of original content. > + @param[out] EncodedContentPointer Pointer to receive the encoded > content pointer. > + @param[out] EncodedContentLength Length of encoded content. > + > + @retval EFI_SUCCESS Content is encoded successfully. > + @retval EFI_UNSUPPORTED No supported encoding funciton, > + @retval EFI_INVALID_PARAMETER One of the given parameter is invali= d. > + > +**/ > + > +EFI_STATUS > +RedfishContentEncode ( > + IN CHAR8 *ContentEncodedValue, > + IN CHAR8 *OriginalContent, > + IN UINTN OriginalContentLength, > + OUT VOID **EncodedContentPointer, > + OUT UINTN *EncodedLength > + ); > + > +/** > + 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. > + > + @param[in] ContentDecodedValue HTTP 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" > + @param[in] ContentPointer Original content. > + @param[in] ContentLength The length of original content. > + @param[out] DecodedContentPointer Pointer to receive decoded > content pointer. > + @param[out] DecodedContentLength Length of decoded content. > + > + @retval EFI_SUCCESS Content is decoded successfully. > + @retval EFI_UNSUPPORTED No supported decoding funciton, > + @retval EFI_INVALID_PARAMETER One of the given parameter is invali= d. > + > +**/ > +EFI_STATUS > +RedfishContentDecode ( > + IN CHAR8 *ContentEncodedValue, > + IN VOID *ContentPointer, > + IN UINTN ContentLength, > + OUT VOID **DecodedContentPointer, > + OUT UINTN *DecodedLength > + ); > +#endif > diff --git > a/RedfishPkg/Library/RedfishContentCodingLibNull/RedfishContentCodingLi > bNull.c > b/RedfishPkg/Library/RedfishContentCodingLibNull/RedfishContentCodingLi > bNull.c > new file mode 100644 > index 0000000000..6d13256e83 > --- /dev/null > +++ > b/RedfishPkg/Library/RedfishContentCodingLibNull/RedfishContentCodingLi > bNull.c > @@ -0,0 +1,81 @@ > +/** @file > + NULL instace of RedfishContentCodingLib > + > + (C) Copyright 2021 Hewlett Packard Enterprise Development LP
> + > + SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ > +#include > + > +/** > + 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. > + > + @param[in] ContentEncodedValue HTTP 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" > + @param[in] OriginalContent Original content. > + @param[in] OriginalContentLength The length of original content. > + @param[out] EncodedContentPointer Pointer to receive the encoded > content pointer. > + @param[out] EncodedContentLength Length of encoded content. > + > + @retval EFI_SUCCESS Content is encoded successfully. > + @retval EFI_UNSUPPORTED No supported encoding funciton, > + @retval EFI_INVALID_PARAMETER One of the given parameter is invali= d. > + > +**/ > +EFI_STATUS > +RedfishContentEncode ( > + IN CHAR8 *ContentEncodedValue, > + IN CHAR8 *OriginalContent, > + IN UINTN OriginalContentLength, > + OUT VOID **EncodedContentPointer, > + OUT UINTN *EncodedContentLength > + ) > +{ > + return EFI_UNSUPPORTED; > +} > + > +/** > + 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. > + > + @param[in] ContentDecodedValue HTTP 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" > + @param[in] ContentPointer Original content. > + @param[in] ContentLength The length of original content. > + @param[out] DecodedContentPointer Pointer to receive decoded > content pointer. > + @param[out] DecodedContentLength Length of decoded content. > + > + @retval EFI_SUCCESS Content is decoded successfully. > + @retval EFI_UNSUPPORTED No supported decoding funciton, > + @retval EFI_INVALID_PARAMETER One of the given parameter is invali= d. > + > +**/ > +EFI_STATUS > +RedfishContentDecode ( > + IN CHAR8 *ContentDecodedValue, > + IN VOID *ContentPointer, > + IN UINTN ContentLength, > + OUT VOID **DecodedContentPointer, > + OUT UINTN *DecodedContentLength > + ) > +{ > + return EFI_UNSUPPORTED; > +} > -- > 2.17.1 >=20 >=20 >=20 >=20 >=20