Private low-level utils for reading/writing data, don't use.
(bb->din bb)Returns a `DataInput` adapter over given `ByteBuffer`. Reads from the buffer's current position and advances it.
(bb->dout bb)Returns a `DataOutput` adapter over given `ByteBuffer`. Writes at the buffer's current position and advances it.
(write-typed _ bb dout_)Writes given object as type-prefixed bytes. Excludes IObj meta.
(write-typed-din _ dout)Writes given object as type-prefixed bytes. Excludes IObj meta. Takes legacy `DataInput`, used for custom extensions.
(write-typed+meta _ bb dout_)Writes given object as type-prefixed bytes. Includes IObj meta when present.
(read-quarantined-serializable-object-unsafe! m)Given a quarantined Serializable object like
{:nippy/unthawable {:class-name <> :content <quarantined-ba>}}, reads and
returns the object WITHOUT regard for `*thaw-serializable-allowlist*`.
**MAY BE UNSAFE!** Don't call this unless you absolutely trust the payload
to not contain any malicious code.
See `*thaw-serializable-allowlist*` for more info.(read-sz!! input-stream class-name)Reads object using Java `Serializable`. May be unsafe!
(read-typed ibr)Reads one object as type-prefixed bytes from given `IByteReader`.
(with-bb f)(with-bb init-size f)(with-bb bb cache_ cache f)Executes `(f bb dout_)` and returns ?ba of bb when `f` returns truthy.
`bb` ---- Auto-expanding `ByteBuffer`. Will reuse ThreadLocal when possible,
currently only freed via GC when thread dies.
`dout_` - Call (dout_) to get a `DataOutput` view on `bb`.(write-coll bb dout_ id-lg coll)(write-coll bb dout_ id-empty id-sm id-md id-lg coll)(write-counted-coll bb dout_ id-lg coll)(write-counted-coll bb dout_ id-empty id-sm id-md id-lg coll)(write-dyn-array-lg bb dout_ arr alen id)Writes an array of dynamic (individually type-prefixed) elements.
(write-kvs bb dout_ id-lg coll)(write-kvs bb dout_ id-empty id-sm id-md id-lg coll)(write-map bb dout_ m is-metadata?)Micro-optimized `write-kvs` w/ id-map-0 id-map-sm id-map-md id-map-lg.
(write-set bb dout_ s)Micro-optimized `write-counted-coll` w/ id-set-0 id-set-sm id-set-md id-set-lg.
(write-sz bb x)Writes given arg using Java `Serializable`. Returns true iff allowed.
(write-uncounted-coll bb dout_ id-lg coll)(write-uncounted-coll bb dout_ id-empty id-sm id-md id-lg coll)cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |