public static void Serialize(Stream stream, Type type, object?value, IBinaryWriterSurrogate?surrogate = default)
        {
            using var writer = new StreamBinaryWriter(stream, surrogate);

            writer.Write(type, value);
        }
        public static void Serialize <T> (Stream stream, T value, IBinaryWriterSurrogate?surrogate = default)
        {
            using var writer = new StreamBinaryWriter(stream, surrogate);

            writer.Write(typeof(T), value);
        }