/// <summary>From Json String to LZ4MessagePack binary</summary> public static byte[] FromJson(TextReader reader) { using (var buffer = MessagePackSerializer.FromJsonUnsafe(reader)) { return(LZ4MessagePackSerializer.ToLZ4Binary(buffer.Span).ToArray()); } }
/// <summary> /// From Json String to LZ4MessagePack binary /// </summary> public static byte[] FromJson(TextReader reader) { var buffer = MessagePackSerializer.FromJsonUnsafe(reader); // offset is guranteed from 0 return(LZ4MessagePackSerializer.ToLZ4Binary(buffer)); }