Exemplo n.º 1
0
        public static byte[] SerializeCountMin(this CountMinSketch estimator, CountMinSketchSerializer serializer)
        {
            using (var stream = new MemoryStream())
            {
                serializer.Serialize(stream, estimator);

                return(stream.ToArray());
            }
        }
Exemplo n.º 2
0
        public static CountMinSketch DeserializeCountMin(this byte[] estimator, CountMinSketchSerializer serializer)
        {
            var stream = new MemoryStream(estimator);

            return(serializer.Deserialize(stream));
        }