Liking cljdoc? Tell your friends :D

com.blockether.vis.internal.attachment.codec

How a stored attachment payload is ENCODED in its BLOB, never what it says.

A row holds its payload raw or as one zstd frame. The codec is a property of the storage only: every read gives the original bytes back, the media type, name and size_bytes stay those of the original, and nothing outside the store sees the codec. Text, HTML, JSON, diffs, SVG, WAV and video often shrink to a fraction; a format that is compressed already stays raw, because a frame is kept only when it saves at least min-saving-percent percent.

Zstd is the pure-Java aircompressor through Nippy, which the store already uses for each BLOB column, so the native image needs nothing new.

How a stored attachment payload is ENCODED in its BLOB, never what it says.

A row holds its payload `raw` or as one `zstd` frame. The codec is a property of
the storage only: every read gives the original bytes back, the media type,
name and `size_bytes` stay those of the original, and nothing outside the store
sees the codec. Text, HTML, JSON, diffs, SVG, WAV and video often shrink to a
fraction; a format that is compressed already stays `raw`, because a frame is
kept only when it saves at least [[min-saving-percent]] percent.

Zstd is the pure-Java aircompressor through Nippy, which the store already uses
for each BLOB column, so the native image needs nothing new.
raw docstring

min-bytesclj

The smallest payload that the compactor reads. A smaller one cannot save enough to pay for its pass.

The smallest payload that the compactor reads. A smaller one cannot save enough
to pay for its pass.
sourceraw docstring

min-saving-percentclj

The smallest saving that a zstd frame must give.

The smallest saving that a zstd frame must give.
sourceraw docstring

packclj

(pack data)

{:bytes :codec} for the payload data: a zstd frame when it saves at least min-saving-percent percent and gives data back exactly, else data itself as raw. Never throws.

`{:bytes :codec}` for the payload `data`: a zstd frame when it saves at least
[[min-saving-percent]] percent and gives `data` back exactly, else `data` itself
as `raw`. Never throws.
sourceraw docstring

rawclj

The codec of a payload stored as it is.

The codec of a payload stored as it is.
sourceraw docstring

unpackclj

(unpack stored codec)

The original bytes of a payload stored as stored with codec. A nil codec is raw: a row from before the codec column. An unknown codec throws, because its bytes are not the payload.

The original bytes of a payload stored as `stored` with `codec`. A nil codec is
`raw`: a row from before the codec column. An unknown codec throws, because its
bytes are not the payload.
sourceraw docstring

zstdclj

The codec of a payload stored as one zstd frame.

The codec of a payload stored as one zstd frame.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close