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/http/http2_connection.hpp b/http/http2_connection.hpp
index 99604f5..e9e9cd8 100644
--- a/http/http2_connection.hpp
+++ b/http/http2_connection.hpp
@@ -52,6 +52,7 @@
     std::shared_ptr<Request> req = std::make_shared<Request>();
     std::optional<bmcweb::HttpBody::reader> reqReader;
     std::string accept;
+    std::string acceptEnc;
     Response res;
     std::optional<bmcweb::HttpBody::writer> writer;
 };
@@ -205,7 +206,7 @@
         Response& res = stream.res;
         res = std::move(completedRes);
 
-        completeResponseFields(stream.accept, res);
+        completeResponseFields(stream.accept, stream.acceptEnc, res);
         res.addHeader(boost::beast::http::field::date, getCachedDateStr());
         res.preparePayload();
 
@@ -277,7 +278,9 @@
             }
         }
         crow::Request& thisReq = *it->second.req;
-        it->second.accept = thisReq.getHeaderValue("Accept");
+        using boost::beast::http::field;
+        it->second.accept = thisReq.getHeaderValue(field::accept);
+        it->second.acceptEnc = thisReq.getHeaderValue(field::accept_encoding);
 
         BMCWEB_LOG_DEBUG("Handling {} \"{}\"", logPtr(&thisReq),
                          thisReq.url().encoded_path());
@@ -520,7 +523,7 @@
         {
             BMCWEB_LOG_DEBUG("create stream for id {}", frame.hd.stream_id);
 
-            streams.emplace(frame.hd.stream_id, Http2StreamData());
+            streams[frame.hd.stream_id];
         }
         return 0;
     }