Exemplo n.º 1
0
        private static void P2H(StreamWriter w, StreamReader r)
        {
            while (true)
            {
                var p = r.ReadLine();
                if (string.IsNullOrEmpty(p))
                {
                    break;
                }

                var hdr = Multicodec.Header(Encoding.UTF8.GetBytes(p));
                w.Write(hdr);
            }
        }
Exemplo n.º 2
0
        private static void Filter(StreamWriter w, StreamReader r, string path)
        {
            throw new NotImplementedException();
            var hdr = Multicodec.Header(Encoding.UTF8.GetBytes(path));

            Decode(r, (codec, value) =>
            {
                if (!codec.Last.Header.SequenceEqual(hdr))
                {
                    return(true);
                }

                return(true);
            });
        }
Exemplo n.º 3
0
 private static void Header(StreamWriter w, string path)
 {
     w.Write(Multicodec.Header(Encoding.UTF8.GetBytes(path)));
 }
Exemplo n.º 4
0
        private static ICodec CodecWithPath(string path)
        {
            var hdr = Multicodec.Header(Encoding.UTF8.GetBytes(path));

            return(MuxCodec.CodecWithHeader(hdr, MuxCodec.Standard.Codecs));
        }