using Minint.Core.Models;

namespace Minint.Core.Services;

public interface IMinintSerializer
{
    /// <summary>
    /// Serializes the container to a binary .minint stream.
    /// </summary>
    void Write(Stream stream, MinintContainer container);

    /// <summary>
    /// Deserializes a .minint stream into a container.
    /// Throws <see cref="InvalidDataException"/> on format/validation errors.
    /// </summary>
    MinintContainer Read(Stream stream);
}
