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
+5-5
Original file line number
Diff line number
Diff line change
@@ -22,10 +22,10 @@
22
22
23
23
## Overview
24
24
25
-
StickyEncoding facilitates the encoding and decoding of `Codable` values into and output of a binary
25
+
StickyEncoding facilitates the encoding and decoding of `Codable` values into and out of a binary
26
26
format that can be stored on disk or sent over a socket.
27
27
28
-
Encoding is done using a `BinaryEncoder` instance and will encode any `Encodable` type whether you declare conformance to `Encodable` and let the compiler create the code or you manually implement the conformance yourself.
28
+
Encoding is done using a `BinaryEncoder` instance and will encode any `Encodable` type whether you declare conformance to `Encodable` and let the compiler create the code, or you manually implement the conformance yourself.
29
29
30
30
Decoding is done using a `BinaryDecoder` instance and can decode any `Decodable` type that was previously encoded using the `BinaryEncoder`. Of course you can declare `Encodable` or `Decodable` conformance by using `Codable` as well.
31
31
@@ -43,7 +43,7 @@ To create an instance of a BinaryEncoder:
43
43
44
44
> Note: You may optionally pass your own userInfo `BinaryEncoder(userInfo:)` structure and it will be available to you during the encoding.
45
45
46
-
You can encode any top even top-level single value types including Int,
46
+
You can encode any top-level single value type including Int,
47
47
UInt, Double, Bool, and Strings. Simply pass the value to the instance
48
48
of the BinaryEncoder and call `encode`.
49
49
```Swift
@@ -81,9 +81,9 @@ To decode, you pass the Type of object to create, and an instance of encoded dat
81
81
82
82
### EncodedData
83
83
84
-
An intermediate representation which represents the encoded data. This type is the direct connection between raw memory and a type that can be converted to and from a `Codable` object.
84
+
The `BinaryEncoder.encode` method returns a type called `EncodedData` (likewise `BinaryDecoder.decode` accepts an `EncodedData` instance). This type is the direct connection between raw memory and a type that can be converted to and from a `Codable` object.
85
85
86
-
StickyEncoding uses an intermediate representation so that it can support many use cases from direct byte conversion to writing/reading directly to/from raw memory.
86
+
StickyEncoding uses this intermediate representation so that it can support many use cases from direct byte conversion to writing/reading directly to/from raw memory.
87
87
88
88
When encoding of an object, the intermediate representation has already been
89
89
encoded down to a form that can be rapidly written to memory.
0 commit comments