Implement zstd decompression

Given the size of Redfish schemas these days, it would be nice to be
able to store them on disk in a zstd format.  Unfortunately, not all
clients support zstd at this time.

This commit implements reading of zstd files from disk, as well as
decompressing zstd in the case where the client does not support zstd as
a return type.

Tested:
Implanted an artificial zstd file into the system, and observed correct
decompression both with an allow-encoding header of empty string and
zstd.

Change-Id: I8b631bb943de99002fdd6745340aec010ee591ff
Signed-off-by: Ed Tanous <etanous@nvidia.com>
diff --git a/test/http/http_body_test.cpp b/test/http/http_body_test.cpp
index 75c81fa..889161c 100644
--- a/test/http/http_body_test.cpp
+++ b/test/http/http_body_test.cpp
@@ -62,13 +62,14 @@
     // Move constructor
     HttpBody::value_type value2 = value;
     EXPECT_EQ(value2.encodingType, EncodingType::Raw);
+    EXPECT_EQ(value2.compressionType, CompressionType::Raw);
     EXPECT_EQ(value2.str(), "teststring");
     EXPECT_EQ(value2.payloadSize(), 10);
 }
 
 TEST(HttpHttpBodyValueType, MoveFile)
 {
-    HttpBody::value_type value(EncodingType::Base64);
+    HttpBody::value_type value(EncodingType::Base64, CompressionType::Raw);
     TemporaryFileHandle temporaryFile("teststring");
     boost::system::error_code ec;
     value.open(temporaryFile.stringPath.c_str(), boost::beast::file_mode::read,
@@ -80,6 +81,7 @@
     size_t out = value2.file().read(buffer.data(), buffer.size(), ec);
     ASSERT_FALSE(ec);
     EXPECT_EQ(value2.encodingType, EncodingType::Base64);
+    EXPECT_EQ(value2.compressionType, CompressionType::Raw);
 
     EXPECT_THAT(std::span(buffer.data(), out),
                 ElementsAre('t', 'e', 's', 't', 's', 't', 'r', 'i', 'n', 'g'));
@@ -92,7 +94,7 @@
 
 TEST(HttpHttpBodyValueType, MoveOperatorFile)
 {
-    HttpBody::value_type value(EncodingType::Base64);
+    HttpBody::value_type value(EncodingType::Base64, CompressionType::Raw);
     TemporaryFileHandle temporaryFile("teststring");
     boost::system::error_code ec;
     value.open(temporaryFile.stringPath.c_str(), boost::beast::file_mode::read,
@@ -104,6 +106,7 @@
     size_t out = value2.file().read(buffer.data(), buffer.size(), ec);
     ASSERT_FALSE(ec);
     EXPECT_EQ(value2.encodingType, EncodingType::Base64);
+    EXPECT_EQ(value2.compressionType, CompressionType::Raw);
 
     EXPECT_THAT(std::span(buffer.data(), out),
                 ElementsAre('t', 'e', 's', 't', 's', 't', 'r', 'i', 'n', 'g'));
@@ -115,7 +118,7 @@
 
 TEST(HttpFileBodyValueType, SetFd)
 {
-    HttpBody::value_type value(EncodingType::Base64);
+    HttpBody::value_type value(EncodingType::Base64, CompressionType::Raw);
     TemporaryFileHandle temporaryFile("teststring");
     boost::system::error_code ec;
     FILE* r = fopen(temporaryFile.stringPath.c_str(), "r");