/// <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());
     }
 }
示例#2
0
        /// <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));
        }