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
The RawBinaryTranscoder provides the ability for the user to explicitly store and retrieve raw byte data to Couchbase.
146
-
The transcoder does not perform any form of real transcoding, and does not take a serializer, but rather passes the data through and assigns the appropriate binary Common Flag.
146
+
The transcoder does not perform any form of real transcoding, and does not take a serializer, but rather passes the data through and assigns the appropriate `Binary` Common Flag (except in the case of an exception).
147
147
148
148
[cols="3", options="header"]
149
149
|===
150
150
|Item
151
-
|Result
152
-
|Common Flag
151
+
|Encoding Result
152
+
|Decoding Result
153
153
154
154
|String
155
155
|InvalidArgumentException
156
-
|-
156
+
|InvalidArgumentException
157
157
158
158
|byte[]
159
159
|Passthrough
160
-
|Binary
160
+
|Passthrough
161
+
162
+
|Memory<byte>
163
+
|Passthrough +
164
+
(from 3.2.6)
165
+
|InvalidArgumentException
166
+
167
+
|ReadOnlyMemory<byte>
168
+
|Passthrough +
169
+
(from 3.2.6)
170
+
|InvalidArgumentException
171
+
172
+
|IMemoryOwner<byte>
173
+
|InvalidArgumentException
174
+
|Passthrough +
175
+
(from 3.2.6)
161
176
162
177
|Other `Object`
163
178
|InvalidArgumentException
164
-
|-
179
+
|InvalidArgumentException
165
180
|===
166
181
167
182
Here’s an example of using the `RawBinaryTranscoder`:
@@ -171,6 +186,14 @@ Here’s an example of using the `RawBinaryTranscoder`:
From version 3.2.6, the `RawBinaryTranscoder` will accept `Memory<byte>` and `ReadOnlyMemory<byte>` inputs and can return `IMemoryOwner<byte>` outputs.
190
+
Using these types may improve performance by not allocating large, temporary `byte[]` arrays on the heap.
0 commit comments