예제 #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="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);
예제 #5
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);
예제 #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>
 /// Special decoding method for torrent files - allows dictionary attributes to be out of order for the
 /// overall torrent file, but imposes strict rules on the info dictionary.
 /// </summary>
 /// <returns></returns>
 public static BEncodedDictionary DecodeTorrent(RawReader reader)
 {
     return(BEncodeDecoder.DecodeTorrent(reader));
 }
예제 #9
0
 /// <summary>
 /// Special decoding method for torrent files - allows dictionary attributes to be out of order for the
 /// overall torrent file, but imposes strict rules on the info dictionary.
 /// </summary>
 /// <returns></returns>
 public static (BEncodedDictionary torrent, InfoHash infohash) DecodeTorrent(RawReader reader)
 {
     return(BEncodeDecoder.DecodeTorrent(reader));
 }
예제 #10
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));
 }