#pragma once
#include <string>
#include <vector>
#include <yaml-cpp/yaml.h>

class ScenePacker
{
public:
    // Serialize a YAML::Node to compressed binary
    static std::vector<uint8_t> Pack(const YAML::Node& node);

    // Serialize a YAML text string to compressed binary
    static std::vector<uint8_t> PackText(const std::string& yamlText);

    // Deserialize binary to YAML::Node (verifies and decompresses)
    static YAML::Node Unpack(const std::vector<uint8_t>& binary);

    // Deserialize binary to raw YAML string
    static std::string UnpackText(const std::vector<uint8_t>& binary);

private:
    static uint32_t ComputeCRC32(const void* data, size_t size);
};
