|
Bny.RawBytes 1.0.0
C# library for reading and writing binary data
|
Contains functions for converting from and to byte array More...
Static Public Member Functions | |
| static int | From< T > (T? value, Span< byte > result, BytesParam? par=null) |
| Converts the value into byte array More... | |
| static int | From (object? value, Span< byte > result, BytesParam? par=null) |
| Converts the value into byte array More... | |
| static int | TryFrom< T > (T? value, Span< byte > result, BytesParam? par=null) |
| Converts the value into byte array More... | |
| static int | TryFrom (object? value, Span< byte > result, BytesParam? par=null) |
| Converts the value into byte array More... | |
| static void | From< T > (T? value, Stream output, BytesParam? par=null) |
| Converts the value into bytes and writes it to a stream More... | |
| static void | From (object? value, Stream output, BytesParam? par=null) |
| Converts the value into bytes and writes it to a stream More... | |
| static bool | TryFrom< T > (T? value, Stream output, BytesParam? par=null) |
| Converts the value into bytes and writes it to a stream More... | |
| static bool | TryFrom (object? value, Stream output, BytesParam? par=null) |
| Converts the value into bytes and writes it to a stream More... | |
| static T | To< T > (ReadOnlySpan< byte > data, BytesParam? par=null) |
| Converts byte array to the given type More... | |
| static T | To< T > (ReadOnlySpan< byte > data, out int readedBytes, BytesParam? par=null) |
| Converts byte array to the given type More... | |
| static object | To (ReadOnlySpan< byte > data, Type type, BytesParam? par=null) |
| Converts byte array to the given type More... | |
| static object | To (ReadOnlySpan< byte > data, Type type, out int readedBytes, BytesParam? par=null) |
| Converts byte array to the given type More... | |
| static int | TryTo< T > (ReadOnlySpan< byte > data, out T? result, BytesParam? par=null) |
| Converts byte array to the given type More... | |
| static int | TryTo (ReadOnlySpan< byte > data, Type type, out object? result, BytesParam? par=null) |
| Converts byte array to the given type More... | |
| static T | To< T > (Stream data, BytesParam? par=null) |
| Reads the given type from the given stream More... | |
| static object | To (Stream data, Type type, BytesParam? par=null) |
| Reads the given type from the given stream More... | |
| static bool | TryTo< T > (Stream data, [NotNullWhen(true)] out T? result, BytesParam? par=null) |
| Reads the given type from the given stream More... | |
| static bool | TryTo (Stream data, Type type, [NotNullWhen(true)] out object? result, BytesParam? par=null) |
| Reads the given type from the given stream More... | |
Static Public Attributes | |
| static readonly Endianness | DefaultEndianness |
| The default byte order More... | |
Properties | |
| static unsafe bool | IsDefaultLE [get] |
Gets the default endianness. Returns true if the Endianness.Default conversion has the same results as Endianness.Little, otherwise returns false. | |
Contains functions for converting from and to byte array
|
static |
Converts the value into byte array
| value | value to convert |
| result | Where the bytes will be written |
| par | the conversion parameters, null creates default conversion parameters |
| ArgumentException | thrown for unsupported types |
|
static |
Converts the value into bytes and writes it to a stream
| value | vylue to convert |
| output | Where the bytes will be written |
| par | the conversion parameters, null creates default conversion parameters |
| ArgumentException | thrown for unsupported types |
|
static |
Converts the value into byte array
| T | Type of the value to convert |
| value | value to convert |
| result | Where the bytes will be written |
| par | the conversion parameters, null creates default conversion parameters |
| ArgumentException | thrown for unsupported types |
|
static |
Converts the value into bytes and writes it to a stream
| T | Type of the value to convert |
| value | vylue to convert |
| output | Where the bytes will be written |
| par | the conversion parameters, null creates default conversion parameters |
| ArgumentException | thrown for unsupported types |
|
static |
Converts byte array to the given type
| data | Bytes to convert |
| type | Type to convert to |
| par | the conversion parameters, null creates default conversion parameters |
| ArgumentException | Thrown for unsuported types |
|
static |
Converts byte array to the given type
| data | Bytes to convert |
| type | Type to convert to |
| readedBytes | number of bytes readed |
| par | the conversion parameters, null creates default conversion parameters |
| ArgumentException | Thrown for unsuported types |
|
static |
Reads the given type from the given stream
| data | Stream to read from |
| type | type to convert to |
| par | the conversion parameters, null creates default conversion parameters |
| ArgumentException | T hrown for unsuported types |
|
static |
Converts byte array to the given type
| T | Type to convert to |
| data | Bytes to convert |
| par | the conversion parameters, null creates default conversion parameters |
|
static |
Converts byte array to the given type
| T | Type to convert to |
| data | Bytes to convert |
| readedBytes | number of bytes readed |
| par | the conversion parameters, null creates default conversion parameters |
|
static |
Reads the given type from the given stream
| T | type to convert to |
| data | Stream to read from |
| par | the conversion parameters, null creates default conversion parameters |
| ArgumentException | Thrown for unsuported types |
|
static |
Converts the value into byte array
| value | value to convert |
| result | Where the bytes will be written |
| par | the conversion parameters, null creates default conversion parameters |
|
static |
Converts the value into bytes and writes it to a stream
| value | value to convert |
| output | Where the bytes will be written |
| par | the conversion parameters, null creates default conversion parameters |
|
static |
Converts the value into byte array
| T | Type of the value to convert |
| value | value to convert |
| result | Where the bytes will be written |
| par | the conversion parameters, null creates default conversion parameters |
|
static |
Converts the value into bytes and writes it to a stream
| T | Type of the value to convert |
| value | value to convert |
| output | Where the bytes will be written |
| par | the conversion parameters, null creates default conversion parameters |
|
static |
Converts byte array to the given type
| data | Bytes to convert |
| type | Type to convert to |
| result | the converted value |
| par | the conversion parameters, null creates default conversion parameters |
|
static |
Reads the given type from the given stream
| data | Stream to read from |
| type | Type to convert to |
| result | Result of the conversion |
| par | the conversion parameters, null creates default conversion parameters |
|
static |
Converts byte array to the given type
| T | Type to convert to |
| data | Bytes to convert |
| result | the result, not null when returns positive |
| par | the conversion parameters, null creates default conversion parameters |
|
static |
Reads the given type from the given stream
| T | type to convert to |
| data | Stream to read from |
| result | the result od the operation |
| par | the conversion parameters, null creates default conversion parameters |
|
static |
The default byte order