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); } }
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); }); }
private static void Header(StreamWriter w, string path) { w.Write(Multicodec.Header(Encoding.UTF8.GetBytes(path))); }
private static ICodec CodecWithPath(string path) { var hdr = Multicodec.Header(Encoding.UTF8.GetBytes(path)); return(MuxCodec.CodecWithHeader(hdr, MuxCodec.Standard.Codecs)); }