Kagome
Polkadot Runtime Engine in C++17
uncompress_code_if_needed.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_CORE_RUNTIME_UNCOMPRESS_IF_NEEDED_HPP
7 #define KAGOME_CORE_RUNTIME_UNCOMPRESS_IF_NEEDED_HPP
8 
9 #include "common/buffer.hpp"
10 
11 namespace kagome::runtime {
12  enum class UncompressError : uint8_t { ZSTD_ERROR };
13 
14  outcome::result<void> uncompressCodeIfNeeded(common::BufferView buf,
15  common::Buffer &res);
16 } // namespace kagome::runtime
17 
19 
20 #endif // KAGOME_CORE_RUNTIME_UNCOMPRESS_IF_NEEDED_HPP
Class represents arbitrary (including empty) byte buffer.
Definition: buffer.hpp:29
OUTCOME_HPP_DECLARE_ERROR(kagome::runtime, UncompressError)
outcome::result< void > uncompressCodeIfNeeded(common::BufferView buf, common::Buffer &res)