#pragma once #include #include namespace CesiumAsync { class AsyncSystem; /** * @brief A decorator for an {@link IAssetAccessor} that automatically unzips * gzipped asset responses from the underlying Asset Accessor. */ class GunzipAssetAccessor : public IAssetAccessor { public: /** * @brief Constructs a new instance. * * @param pAssetAccessor The underlying {@link IAssetAccessor} used to * retrieve assets that may or may not be zipped. */ GunzipAssetAccessor(const std::shared_ptr& pAssetAccessor); virtual ~GunzipAssetAccessor() noexcept override; /** @copydoc IAssetAccessor::get */ virtual Future> get(const AsyncSystem& asyncSystem, const std::string& url, const std::vector& headers) override; virtual Future> request( const AsyncSystem& asyncSystem, const std::string& verb, const std::string& url, const std::vector& headers, const std::span& contentPayload) override; /** @copydoc IAssetAccessor::tick */ virtual void tick() noexcept override; private: std::shared_ptr _pAssetAccessor; }; } // namespace CesiumAsync