You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,14 @@
1
1
# ByteStream
2
-
A blazing fast byte (de)serializer for C#
2
+
A blazing fast byte (de)serializer for C#.
3
+
4
+
Available on Nuget via ```Install-Package ByteStream```
3
5
4
6
## What is ByteStream?
5
7
Bytestream is a small library that enables blazing fast serialization of a collection of types to raw bytes. Either in the form of a byte array `byte[]` or unmanaged memory `IntPtr`.
6
8
The library performs no memory allocation on its own, so you are free to use your own memory allocator!
7
9
10
+
ByteStream is written in NetStandard2.0 making it compatible with .Net, .Net Core and Unity3D among things!
11
+
8
12
*__Carefully read the Usage section__ for a brief introduction on how to use the library.*
9
13
10
14
## What does ByteStream offer?
@@ -19,7 +23,7 @@ Bytestream offers 2 sets of serializers and deserializers, called writers and re
19
23
- Prefixes strings and memory blocks with a 2-byte length (optional).
20
24
21
25
## Supported types:
22
-
- All types that adhere to the [managed constraint](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/unmanaged-types) can be written to, and read from the buffers.
26
+
- All types that adhere to the [unmanaged constraint](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/unmanaged-types) can be written to, and read from the buffers.
23
27
- Byte arrays
24
28
- ANSI strings (1-byte per character)
25
29
- UTF16 strings (2-byte per character, default in C#)
@@ -28,7 +32,7 @@ Bytestream offers 2 sets of serializers and deserializers, called writers and re
28
32
29
33
## Drawbacks
30
34
- The ByteWriter and ByteReader makes heavy use of memory pinning. This can make the unmanaged variant preferable when possible.
31
-
- The writers and readers always make use of pointer conversion. In the case of writing single-byte values to a byte[] buffer, consider directly writing these values to the buffer instead.
35
+
- The writers and readers always make use of pointer conversion. In the case of writing single-byte values to a `byte[]` buffer, consider directly writing these values to the buffer instead.
0 commit comments