There was an error while loading. Please reload this page.
1 parent f2ed87a commit 1e35b41Copy full SHA for 1e35b41
src/msgpack/core.clj
@@ -215,13 +215,17 @@
215
(pack-bytes bytes s)))})
216
217
(defn pack-stream
218
+ "Serialize application value as a stream of MessagePack-formatted bytes.
219
+ Argument type can be either java.io.DataOutput or java.io.OutputStream. Any
220
+ other type is an error."
221
([this stream] (pack-stream this stream nil))
222
([this stream opts]
223
(condp instance? stream
224
DataOutput (packable-pack this stream opts)
225
OutputStream (pack-stream this (DataOutputStream. stream) opts))))
226
227
(defn pack
228
+ "Serialize application value as a MessagePack-formatted byte array"
229
([obj] (pack obj nil))
230
([obj opts]
231
(let [stream (ByteArrayOutputStream.)]
0 commit comments