Пример #1
0
 /// <summary>
 /// Decode BEncoded data in the given stream
 /// </summary>
 /// <param name="stream">The stream containing the BEncoded data</param>
 /// <param name="strictDecoding"></param>
 /// <returns></returns>
 public static BEncodedValue Decode(Stream stream, bool strictDecoding)
 => BEncodeDecoder.Decode(stream, strictDecoding);
Пример #2
0
 /// <summary>
 /// Decode BEncoded data in the given stream
 /// </summary>
 /// <param name="buffer"></param>
 /// <param name="strictDecoding"></param>
 /// <returns></returns>
 public static BEncodedValue Decode(ReadOnlySpan <byte> buffer, bool strictDecoding)
 => BEncodeDecoder.Decode(ref buffer, strictDecoding);
Пример #3
0
 /// <summary>
 /// Decode BEncoded data in the given stream
 /// </summary>
 /// <param name="stream">The stream containing the BEncoded data</param>
 /// <returns>BEncodedValue containing the data that was in the stream</returns>
 public static BEncodedValue Decode(Stream stream)
 => BEncodeDecoder.Decode(stream, DefaultStrictDecoding);
Пример #4
0
 /// <summary>
 /// Decode BEncoded data in the given stream
 /// </summary>
 /// <param name="buffer">The byte array containing the BEncoded data</param>
 /// <returns></returns>
 public static BEncodedValue Decode(ReadOnlySpan <byte> buffer)
 => BEncodeDecoder.Decode(ref buffer, DefaultStrictDecoding);
Пример #5
0
 /// <summary>
 /// Decode BEncoded data in the given stream
 /// </summary>
 /// <param name="stream">The stream containing the BEncoded data</param>
 /// <param name="strictDecoding"></param>
 /// <returns>BEncodedValue containing the data that was in the stream</returns>
 public static T Decode <T> (Stream stream, bool strictDecoding) where T : BEncodedValue
 => (T)BEncodeDecoder.Decode(stream, strictDecoding);
Пример #6
0
 /// <summary>
 /// Decode BEncoded data in the given stream
 /// </summary>
 /// <param name="stream">The stream containing the BEncoded data</param>
 /// <returns>BEncodedValue containing the data that was in the stream</returns>
 public static T Decode <T> (Stream stream) where T : BEncodedValue
 => (T)BEncodeDecoder.Decode(stream, DefaultStrictDecoding);
Пример #7
0
 /// <summary>
 /// Decode BEncoded data in the given byte array
 /// </summary>
 /// <param name="buffer">The byte array containing the BEncoded data</param>
 /// <param name="strictDecoding"></param>
 /// <returns></returns>
 public static T Decode <T> (ReadOnlySpan <byte> buffer, bool strictDecoding) where T : BEncodedValue
 => (T)BEncodeDecoder.Decode(ref buffer, strictDecoding);
Пример #8
0
 /// <summary>
 /// Decode BEncoded data in the given RawReader
 /// </summary>
 /// <param name="reader">The RawReader containing the BEncoded data</param>
 /// <returns>BEncodedValue containing the data that was in the stream</returns>
 public static BEncodedValue Decode(RawReader reader)
 {
     return(BEncodeDecoder.Decode(reader));
 }