#ifndef ENCODER_H_
#define ENCODER_H_
#include <stdint.h>
#include <map>
#include <optional>
#include <string>
#include <vector>
#include "vpd/export.h"
namespace vpd {
class EXPORT Encoder {
public:
struct EncodingParams {
uint32_t partition_offset = 0;
uint32_t eps_offset = 0;
};
static std::optional<std::vector<uint8_t>> Encode(
const EncodingParams& params,
const std::map<std::string, std::string>& dict);
struct DecodedParams {
uint32_t eps_offset = 0;
};
static std::optional<std::map<std::string, std::string>> Decode(
const std::vector<uint8_t>& blob, DecodedParams* params);
static std::optional<std::map<std::string, std::string>> DecodeRaw(
const std::vector<uint8_t>& blob);
};
}
#endif