Expand description
§openzl-sys
Raw Rust bindings to OpenZL (https://github.com/facebook/openzl), a novel data compression framework.
§Bindings
This library includes a pre-generated bindings.rs file for openzl.h. New bindings can be generated using the bindgen feature:
cargo build --features bindgen§Licence
openzl-sys is licensed under either of
- the Apache License, Version 2.0 LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0 or
- the MIT license LICENSE-MIT or http://opensource.org/licenses/MIT, at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Structs§
- ZL_
CCtx_ s - ZL_
Codec Info_ s - ZL_
Codec State Manager - ZL_
Compress Introspection Hooks_ s - ZL_
Compressor Deserializer_ Dependencies - Doesn’t own any memory.
- ZL_
Compressor Deserializer_ s - ZL_
Compressor Serializer_ s - ZL_
Compressor_ s - ZL_
Copy Param - ZL_
Custom Tokenize State_ s - ZL_
DCtx_ s - ZL_
DataID - ZL_
Data Info_ s - ZL_
Data_ s - ZL_
Decoder_ s - ZL_
Dispatch Instructions - ZL_
Dispatch State_ s - ZL_
Dynamic Error Info_ s - ZL_
Edge List - ZL_
Edge_ s - ZL_
Encoder_ s - ZL_
Error Context - ZL_
Error_ Array - ZL_Error_Array: a const view into an array of errors, returned by some public APIs.
- ZL_
Error_ s - ZL_Error:
- ZL_
Frame Info - ZL_
Function Graph Desc - ZL_
Graph Context - ZL_
GraphID - ZL_
GraphID List - ZL_
Graph Parameters_ s - @defgroup Group_Compressor_GraphCustomization Graph Customization
- ZL_
Graph Performance - A measurement of graph performance. Currently this is compressed size, but it is expected to be expanded to include speed.
- ZL_
Graph Report - ZL_
Graph_ s - ZL_
Input_ s - ZL_
IntMetadata - ZL_
IntParam - ZL_
Local Copy Params - ZL_
Local IntParams - ZL_
Local Params - ZL_
Local RefParams - ZL_
MIDecoder Desc - ZL_
MIEncoder Desc - ZL_
MIGraph Desc - ZL_
NodeID - ZL_
NodeID List - ZL_
Node Parameters - @defgroup Group_Compressor_NodeCustomization Node Customization
- ZL_
Opaque Ptr - ZL_
Operation Context_ s - ZL_
Output Info - @brief Information about a decompressed typed output.
- ZL_
Output_ s - ZL_
Parameterized Graph Desc - This creates a new Graphs, based on an existing Graph, but modifying all or parts of its exposed parameters.
- ZL_
Parameterized Node Desc - ZL_
Pipe Decoder Desc - ZL_
Pipe Encoder Desc - ZL_
RBuffer - ZL_
RefParam - ZL_
Reflection Ctx_ s - ZL_
Result_ ZL_ Compressor Deserializer_ Dependencies_ inner - ZL_
Result_ ZL_ Edge List_ inner - ZL_
Result_ ZL_ GraphID_ inner - ZL_
Result_ ZL_ Graph Performance_ inner - ZL_
Result_ ZL_ NodeID_ inner - ZL_
Result_ size_ t_ inner - ZL_
Selector Desc - ZL_
Selector_ s - ZL_
Serial Selector Desc - ZL_
SetString Lens Instructions - ZL_
SetString Lens State_ s - ZL_
Split Decoder Desc - ZL_
Split Encoder Desc - ZL_
Split Instructions - ZL_
Split State_ s - ZL_
Static Error Info_ s - ZL_StaticErrorInfo *
- ZL_
Static Graph Desc - ZL_
Static Graph Parameters - @defgroup Group_Compressor_StaticGraphCreation Static Graph Creation
- ZL_
Typed Decoder Desc - ZL_
Typed Encoder Desc - ZL_
Typed Graph Desc - ZL_
VODecoder Desc - ZL_
VOEncoder Desc - ZL_
VOGraph Desc - ZL_
WBuffer - ZL_
WCursor
Constants§
- ZL_
ALLOW_ INTROSPECTION - ZL_
Bitunpack_ numBits - ZL_
CHUNK_ VERSION_ MIN - ZL_
COMPRESSIONLEVEL_ DEFAULT - ZL_
CONVERT_ SERIAL_ TO_ STRUCT_ SIZE_ PID - ZL_
CParam_ compressed Checksum - Enable checksum of the compressed frame. This is useful to check for corruption that happens after compression. Valid values for this parameter use the ZS2_cv3_* format. @default 0 currently means checksum, might change in the future.
- ZL_
CParam_ compression Level - Scale amplitude to determine
- ZL_
CParam_ content Checksum - Enable checksum of the uncompressed content contained in the frame. This is useful to check for corruption that happens after compression, or corruption introduced during (de)compression. However, it cannot distinguish the two alone. In order to determine whether it is corruption or a bug in the ZStrong library, you have to enable both compressed and content checksums. Valid values for this parameter use the ZS2_cv3_* format. @default 0 currently means checksum, might change in the future.
- ZL_
CParam_ decompression Level - Scale amplitude to determine
- ZL_
CParam_ format Version - Sets the format version number to use for encoding. See @ZL_getDefaultEncodingVersion for details. @default 0 means use format version ZL_getDefaultEncodingVersion().
- ZL_
CParam_ minStream Size - Any time an internal data Stream becomes smaller than this size, it gets STORED immediately, without further processing. This reduces processing time, improves decompression speed, and reduce risks of data expansion. Note(@Cyan): follows convention that setting 0 means “default”, aka ZL_MINSTREAMSIZE_DEFAULT. Therefore, in order to completely disable the “automatic store” feature, one must pass a negative threshold value.
- ZL_
CParam_ permissive Compression - Select behavior when an internal compression stage fails. For example, when expecting an array of 32-bit integers, but the input size is not a clean multiple of 4. Strict mode stops at such stage and outputs an error. Permissive mode engages a generic backup compression mechanism, to successfully complete compression, at the cost of efficiency. At the time of this writing, backup is ZL_GRAPH_COMPRESS_GENERIC. Valid values for this parameter use the ZS2_cv3_* format. @default 0 currently means strict mode. This may change in the future.
- ZL_
CParam_ sticky Parameters - Only meaningful at CCtx level (ignored at CGraph level) By default, parameters are reset between compression sessions setting this parameter to 1 keep the parameters across compression sessions.
- ZL_
DECOMPRESSIONLEVEL_ DEFAULT - ZL_
DISPATCH_ CHANNEL_ ID - ZL_
DISPATCH_ INSTRUCTIONS_ PID - ZL_
DISPATCH_ PARSINGFN_ PID - ZL_
DISPATCH_ STRING_ INDICES_ PID - ZL_
DISPATCH_ STRING_ NUM_ OUTPUTS_ PID - ZL_
DIVIDE_ BY_ PID - ZL_
DParam_ check Compressed Checksum - @brief Enable checking the checksum of the compressed frame.
- ZL_
DParam_ check Content Checksum - @brief Enable checking the checksum of the uncompressed content.
- ZL_
DParam_ sticky Parameters - @brief Keep parameters across decompression sessions.
- ZL_
Data Arena Type_ heap - ZL_
Data Arena Type_ stack - ZL_
ENABLE_ ERR_ IF_ ARG_ PRINTING - ZL_
ENABLE_ RET_ IF_ ARG_ PRINTING - ZL_
ERROR_ ENABLE_ STATIC_ ERROR_ INFO - ZL_
Error Code_ GENERIC - ZL_
Error Code_ GENERIC__ desc_ str - ZL_
Error Code_ allocation - ZL_
Error Code_ allocation__ desc_ str - ZL_
Error Code_ compressed Checksum Wrong - ZL_
Error Code_ compressed Checksum Wrong__ desc_ str - ZL_
Error Code_ compression Parameter_ invalid - ZL_
Error Code_ compression Parameter_ invalid__ desc_ str - ZL_
Error Code_ content Checksum Wrong - ZL_
Error Code_ content Checksum Wrong__ desc_ str - ZL_
Error Code_ corruption - ZL_
Error Code_ corruption__ desc_ str - ZL_
Error Code_ custom Node_ definition Invalid - ZL_
Error Code_ custom Node_ definition Invalid__ desc_ str - ZL_
Error Code_ decompression_ incorrectAPI - ZL_
Error Code_ decompression_ incorrectAPI__ desc_ str - ZL_
Error Code_ dstCapacity_ tooSmall - ZL_
Error Code_ dstCapacity_ tooSmall__ desc_ str - ZL_
Error Code_ format Version_ notSet - ZL_
Error Code_ format Version_ notSet__ desc_ str - ZL_
Error Code_ format Version_ unsupported - ZL_
Error Code_ format Version_ unsupported__ desc_ str - ZL_
Error Code_ frame Parameter_ unsupported - ZL_
Error Code_ frame Parameter_ unsupported__ desc_ str - ZL_
Error Code_ graph Parameter_ invalid - ZL_
Error Code_ graph Parameter_ invalid__ desc_ str - ZL_
Error Code_ graph_ invalid - ZL_
Error Code_ graph_ invalid NumInputs - ZL_
Error Code_ graph_ invalid NumInputs__ desc_ str - ZL_
Error Code_ graph_ invalid__ desc_ str - ZL_
Error Code_ graph_ nonserializable - ZL_
Error Code_ graph_ nonserializable__ desc_ str - ZL_
Error Code_ header_ unknown - ZL_
Error Code_ header_ unknown__ desc_ str - ZL_
Error Code_ input Type_ unsupported - ZL_
Error Code_ input Type_ unsupported__ desc_ str - ZL_
Error Code_ integer Overflow - ZL_
Error Code_ integer Overflow__ desc_ str - ZL_
Error Code_ internal Buffer_ tooSmall - ZL_
Error Code_ internal Buffer_ tooSmall__ desc_ str - ZL_
Error Code_ invalid Name - ZL_
Error Code_ invalid Name__ desc_ str - ZL_
Error Code_ invalid Request_ single Output Frame Only - ZL_
Error Code_ invalid Request_ single Output Frame Only__ desc_ str - ZL_
Error Code_ invalid Transform - ZL_
Error Code_ invalid Transform__ desc_ str - ZL_
Error Code_ logic Error - ZL_
Error Code_ logic Error__ desc_ str - ZL_
Error Code_ maxCode - ZL_
Error Code_ no_ error - ZL_
Error Code_ no_ error__ desc_ str - ZL_
Error Code_ node Execution_ invalid Outputs - ZL_
Error Code_ node Execution_ invalid Outputs__ desc_ str - ZL_
Error Code_ node Parameter_ invalid - ZL_
Error Code_ node Parameter_ invalid Value - ZL_
Error Code_ node Parameter_ invalid Value__ desc_ str - ZL_
Error Code_ node Parameter_ invalid__ desc_ str - ZL_
Error Code_ node Regen_ count Incorrect - ZL_
Error Code_ node Regen_ count Incorrect__ desc_ str - ZL_
Error Code_ node_ invalid - ZL_
Error Code_ node_ invalid__ desc_ str - ZL_
Error Code_ node_ invalid_ input - ZL_
Error Code_ node_ invalid_ input__ desc_ str - ZL_
Error Code_ node_ unexpected_ input_ type - ZL_
Error Code_ node_ unexpected_ input_ type__ desc_ str - ZL_
Error Code_ node_ version Mismatch - ZL_
Error Code_ node_ version Mismatch__ desc_ str - ZL_
Error Code_ outputID_ invalid - ZL_
Error Code_ outputID_ invalid__ desc_ str - ZL_
Error Code_ output NotCommitted - ZL_
Error Code_ output NotCommitted__ desc_ str - ZL_
Error Code_ output NotReserved - ZL_
Error Code_ output NotReserved__ desc_ str - ZL_
Error Code_ outputs_ tooNumerous - ZL_
Error Code_ outputs_ tooNumerous__ desc_ str - ZL_
Error Code_ parameter_ invalid - ZL_
Error Code_ parameter_ invalid__ desc_ str - ZL_
Error Code_ segmenter_ input NotConsumed - ZL_
Error Code_ segmenter_ input NotConsumed__ desc_ str - ZL_
Error Code_ srcSize_ tooLarge - ZL_
Error Code_ srcSize_ tooLarge__ desc_ str - ZL_
Error Code_ srcSize_ tooSmall - ZL_
Error Code_ srcSize_ tooSmall__ desc_ str - ZL_
Error Code_ stream Capacity_ tooSmall - ZL_
Error Code_ stream Capacity_ tooSmall__ desc_ str - ZL_
Error Code_ stream Parameter_ invalid - ZL_
Error Code_ stream Parameter_ invalid__ desc_ str - ZL_
Error Code_ stream Type_ incorrect - ZL_
Error Code_ stream Type_ incorrect__ desc_ str - ZL_
Error Code_ stream_ wrong Init - ZL_
Error Code_ stream_ wrong Init__ desc_ str - ZL_
Error Code_ successor_ already Set - ZL_
Error Code_ successor_ already Set__ desc_ str - ZL_
Error Code_ successor_ invalid - ZL_
Error Code_ successor_ invalid NumInputs - ZL_
Error Code_ successor_ invalid NumInputs__ desc_ str - ZL_
Error Code_ successor_ invalid__ desc_ str - ZL_
Error Code_ temporary Library Limitation - ZL_
Error Code_ temporary Library Limitation__ desc_ str - ZL_
Error Code_ transform_ execution Failure - ZL_
Error Code_ transform_ execution Failure__ desc_ str - ZL_
Error Code_ user Buffer_ alignment Incorrect - ZL_
Error Code_ user Buffer_ alignment Incorrect__ desc_ str - ZL_
Error Code_ user Buffers_ invalid Num - ZL_
Error Code_ user Buffers_ invalid Num__ desc_ str - ZL_
FBCODE_ IS_ RELEASE - ZL_
FIELD_ LZ_ COMPRESSION_ LEVEL_ OVERRIDE_ PID - ZL_
FIELD_ LZ_ EXTRA_ LITERAL_ LENGTHS_ GRAPH_ OVERRIDE_ INDEX_ PID - ZL_
FIELD_ LZ_ EXTRA_ MATCH_ LENGTHS_ GRAPH_ OVERRIDE_ INDEX_ PID - ZL_
FIELD_ LZ_ LITERALS_ GRAPH_ OVERRIDE_ INDEX_ PID - ZL_
FIELD_ LZ_ OFFSETS_ GRAPH_ OVERRIDE_ INDEX_ PID - ZL_
FIELD_ LZ_ TOKENS_ GRAPH_ OVERRIDE_ INDEX_ PID - ZL_
Graph Type_ function - ZL_
Graph Type_ multi Input - ZL_
Graph Type_ parameterized - ZL_
Graph Type_ segmenter - ZL_
Graph Type_ selector - ZL_
Graph Type_ standard - ZL_
Graph Type_ static - ZL_
HAVE_ FBCODE - ZL_
HAVE_ X86_ 64_ ASM - ZL_
LIBRARY_ VERSION_ MAJOR - ZL_
LIBRARY_ VERSION_ MINOR - ZL_
LIBRARY_ VERSION_ NUMBER - ZL_
LIBRARY_ VERSION_ PATCH - ZL_
LP_ INVALID_ PARAMID - ZL_
MAX_ FORMAT_ VERSION - ZL_
MINSTREAMSIZE_ DEFAULT - ZL_
MIN_ FORMAT_ VERSION - ZL_
SDDL_ DESCRIPTION_ PID - ZL_
SPLIT_ CHANNEL_ ID - ZL_
Standard GraphID_ bitpack - ZL_
Standard GraphID_ clustering - ZL_
Standard GraphID_ compress_ generic - ZL_
Standard GraphID_ constant - ZL_
Standard GraphID_ entropy - ZL_
Standard GraphID_ field_ lz - ZL_
Standard GraphID_ flatpack - ZL_
Standard GraphID_ fse - ZL_
Standard GraphID_ huffman - ZL_
Standard GraphID_ illegal - ZL_
Standard GraphID_ public_ end - ZL_
Standard GraphID_ select_ generic_ lz_ backend - ZL_
Standard GraphID_ select_ numeric - ZL_
Standard GraphID_ simple_ data_ description_ language - ZL_
Standard GraphID_ store - ZL_
Standard GraphID_ try_ parse_ int - ZL_
Standard GraphID_ zstd - ZL_
Standard NodeID_ bfloat16_ deconstruct - ZL_
Standard NodeID_ bitunpack - ZL_
Standard NodeID_ concat_ num - ZL_
Standard NodeID_ concat_ serial - ZL_
Standard NodeID_ concat_ string - ZL_
Standard NodeID_ concat_ struct - ZL_
Standard NodeID_ convert_ num_ to_ serial_ le - ZL_
Standard NodeID_ convert_ num_ to_ struct_ le - ZL_
Standard NodeID_ convert_ serial_ to_ num8 - ZL_
Standard NodeID_ convert_ serial_ to_ num_ be16 - ZL_
Standard NodeID_ convert_ serial_ to_ num_ be32 - ZL_
Standard NodeID_ convert_ serial_ to_ num_ be64 - ZL_
Standard NodeID_ convert_ serial_ to_ num_ le16 - ZL_
Standard NodeID_ convert_ serial_ to_ num_ le32 - ZL_
Standard NodeID_ convert_ serial_ to_ num_ le64 - ZL_
Standard NodeID_ convert_ serial_ to_ struct - ZL_
Standard NodeID_ convert_ serial_ to_ struct2 - ZL_
Standard NodeID_ convert_ serial_ to_ struct4 - ZL_
Standard NodeID_ convert_ serial_ to_ struct8 - ZL_
Standard NodeID_ convert_ struct_ to_ num_ be - ZL_
Standard NodeID_ convert_ struct_ to_ num_ le - ZL_
Standard NodeID_ convert_ struct_ to_ serial - ZL_
Standard NodeID_ dedup_ num - ZL_
Standard NodeID_ delta_ int - ZL_
Standard NodeID_ dispatchN_ byTag - ZL_
Standard NodeID_ dispatch_ string - ZL_
Standard NodeID_ divide_ by - ZL_
Standard NodeID_ field_ lz - ZL_
Standard NodeID_ float16_ deconstruct - ZL_
Standard NodeID_ float32_ deconstruct - ZL_
Standard NodeID_ illegal - ZL_
Standard NodeID_ interleave_ string - ZL_
Standard NodeID_ merge_ sorted - ZL_
Standard NodeID_ parse_ int - ZL_
Standard NodeID_ prefix - ZL_
Standard NodeID_ public_ end - ZL_
Standard NodeID_ quantize_ lengths - ZL_
Standard NodeID_ quantize_ offsets - ZL_
Standard NodeID_ range_ pack - ZL_
Standard NodeID_ separate_ string_ components - ZL_
Standard NodeID_ tokenize_ numeric - ZL_
Standard NodeID_ tokenize_ string - ZL_
Standard NodeID_ tokenize_ struct - ZL_
Standard NodeID_ transpose_ split - ZL_
Standard NodeID_ zigzag - ZL_
TOKENIZE_ SORT_ PID - ZL_
TYPED_ INPUT_ VERSION_ MIN - ZL_
Ternary Param_ auto - ZL_
Ternary Param_ disable - ZL_
Ternary Param_ enable - ZL_
Type_ numeric - ZL_
Type_ serial - ZL_
Type_ string - ZL_
Type_ struct - ZL_
trlip_ token Size
Functions§
- ZL_
CCtx_ ⚠attach Introspection Hooks - @brief Attach introspection hooks to the CCtx.
- ZL_
CCtx_ ⚠compress - @brief A one-shot (blocking) compression function.
- ZL_
CCtx_ ⚠compress Multi Typed Ref - Compresses multiple typed inputs , presented as an
array of
ZL_TypedRef. See below for TypedRef* object creation. - ZL_
CCtx_ ⚠compress Typed Ref - Compresses a single typed input presented as a
ZL_TypedRef. See below for TypedRef* object creation. - ZL_
CCtx_ ⚠create - ZL_
CCtx_ ⚠detach AllIntrospection Hooks - Detach any introspection hooks currently attached to the CCtx.
- ZL_
CCtx_ ⚠free - ZL_
CCtx_ ⚠getError Context String - Gets the error context for a given ZL_Report. This context is useful for debugging and for submitting bug reports to Zstrong developers.
- ZL_
CCtx_ ⚠getError Context String_ from Error - See ZL_CCtx_getErrorContextString()
- ZL_
CCtx_ ⚠getOperation Context - ZL_
CCtx_ ⚠getParameter - @brief Reads a compression parameter’s configured value from the CCtx.
- ZL_
CCtx_ ⚠getWarnings - Gets the warnings that were encountered during the lifetime of the most recent compression operation.
- ZL_
CCtx_ ⚠refCompressor - @brief Pass @p compressor as a
ZL_Compressor*object to the compression state. Compression will start with the default Starting GraphID of @p compressor, using its default parameters provided at registration time. @note Only one compressor can be referenced at a time. Referencing a new compressor deletes previous reference. @note If a custom GraphID and parameters were previously set, invoking this method will reset them to default. @pre @p compressor must remain valid for the duration of its usage. @pre @p compressor must be already validated. - ZL_
CCtx_ ⚠reset Parameters - @brief Resets the parameters in the cctx to a blank state.
- ZL_
CCtx_ ⚠select Starting GraphID - @brief Set the starting Graph of next compression, as @p graphID referenced in the provided @p compressor, optionally providing it with some runtime parameters. @pre @p compressor must remain valid for the duration of its usage. @pre @p compressor must be already validated.
- ZL_
CCtx_ ⚠setData Arena - Sets the Arena for Data* objects in the CCtx. This frees the previous Data Arena and creates a new one. This choice remains sticky, until set again. The default Data Arena is HeapArena.
- ZL_
CCtx_ ⚠setParameter - @brief Sets a global compression parameter via the CCtx.
- ZL_
Codec ⚠Info_ getCodecID - @returns The transform ID
- ZL_
Codec ⚠Info_ getHeader Ptr - @returns The header pointer for the transform.
- ZL_
Codec ⚠Info_ getHeader Size - @returns The header size of the transform.
- ZL_
Codec ⚠Info_ getIndex - @returns The index for which ZL_ReflectionCtx_getCodec_lastChunk() returns this transform.
- ZL_
Codec ⚠Info_ getInput - @returns The input stream of the transform at index @p index @pre index is valid
- ZL_
Codec ⚠Info_ getName - @returns The name of the transform
- ZL_
Codec ⚠Info_ getNum Inputs - @returns The number of input streams to the transform. Input streams are streams that are consumed by the encoder and produced by the decoder.
- ZL_
Codec ⚠Info_ getNum Outputs - @returns The number of output streams to the transform. Output streams are streams that are produced by the encoder and consumed by the decoder.
- ZL_
Codec ⚠Info_ getNum Variable Outputs - @returns The number of output streams of the transform that are variable outputs. Necessarily no greater than ZL_CodecInfo_getOutput().
- ZL_
Codec ⚠Info_ getOutput - @returns The output stream of the transform at index @p index @pre index is valid
- ZL_
Codec ⚠Info_ isCustom Codec - @returns true iff the transform is a custom transform.
- ZL_
Codec ⚠Info_ isStandard Codec - @returns true iff the transform is a standard transform.
- ZL_
Compressor ⚠Deserializer_ create - Creates and initializes an opaque
ZL_CompressorDeserializerobject. - ZL_
Compressor ⚠Deserializer_ deserialize - Reads the serialized compressor represented by @p serialized and pushes the graph structure and configuration it describes into @p compressor.
- ZL_
Compressor ⚠Deserializer_ free - Frees all the resources owned by the @p deserializer, including the @p deserializer itself.
- ZL_
Compressor ⚠Deserializer_ getDependencies - Read the serialized compressor from @p serialized and find all of the nodes and graphs that the serialized compressor refers to but that aren’t present in the serialized compressor. I.e., lists all the components that must be present on a destination compressor in order for this serialized compressor to correctly materialize onto that destination compressor.
- ZL_
Compressor ⚠Deserializer_ getError Context String - Safely retrieve the full error message associated with an error.
- ZL_
Compressor ⚠Deserializer_ getError Context String_ from Error - Like @ref ZL_CompressorDeserializer_getErrorContextString(), but generic across result types. Use like:
- ZL_
Compressor ⚠Deserializer_ getOperation Context - ZL_
Compressor ⚠Serializer_ convert ToJson - Converts an already-serialized compressor to human-readable JSON.
- ZL_
Compressor ⚠Serializer_ create - Creates and initializes an opaque
ZL_CompressorSerializerobject. - ZL_
Compressor ⚠Serializer_ free - Frees all the resources owned by the @p serializer, including the @p serializer itself.
- ZL_
Compressor ⚠Serializer_ getError Context String - Safely retrieve the full error message associated with an error.
- ZL_
Compressor ⚠Serializer_ getError Context String_ from Error - Like @ref ZL_CompressorSerializer_getErrorContextString(), but generic across result types. Use like:
- ZL_
Compressor ⚠Serializer_ getOperation Context - ZL_
Compressor ⚠Serializer_ serialize - Returns a serialized representation of the given @p compressor.
- ZL_
Compressor ⚠Serializer_ serialize ToJson - Equivalent @ref ZL_CompressorSerializer_serialize, but produces a human- readable output for debugging. This output format cannot currently be consumed by OpenZL.
- ZL_
Compressor_ ⚠Graph_ getBase GraphID - @returns If the provided @p graphid was created by modifying another
existing graph, i.e., its type is
ZL_GraphType_parameterized, theZL_GraphIDof that other graph. Otherwise, it returnsZL_GRAPH_ILLEGAL. - ZL_
Compressor_ ⚠Graph_ getCustom Graphs - @returns The custom graphs of @p graphid, which is only non-empty for selector, dynamic, and multi-input graphs. @note The array is valid for the lifetime of the @p compressor.
- ZL_
Compressor_ ⚠Graph_ getCustom Nodes - @returns The custom nodes of @p graphid, which is only non-empty for dynamic and multi-input graphs. @note The array is valid for the lifetime of the @p compressor.
- ZL_
Compressor_ ⚠Graph_ getHead Node - @returns The head node of the graph if @p graphid is a static graph, otherwise returns ZL_NODE_ILLEGAL.
- ZL_
Compressor_ ⚠Graph_ getInput0 Mask - @returns The input stream types that @p graphid is compatible with. @pre @p graph must be valid, and must have a single input stream
- ZL_
Compressor_ ⚠Graph_ getInput Mask - @returns The input stream types that @p graphid input @p inputIdx is compatible with.
- ZL_
Compressor_ ⚠Graph_ getLocal Params - @returns The local params of @p graphid. @note The params for the lifetime of the @p compressor.
- ZL_
Compressor_ ⚠Graph_ getName - @returns the (optional) @p name given to this graphid. When none provided, returns “”. When graphid is illegal (invalid), returns NULL.
- ZL_
Compressor_ ⚠Graph_ getNum Inputs - @returns The number of input streams that @p graphid expects.
- ZL_
Compressor_ ⚠Graph_ getSuccessors - @returns The successor of the head node in the graph if @p graphid is a static graph, otherwise returns an empty list. @note The array is valid for the lifetime of the @p compressor.
- ZL_
Compressor_ ⚠Graph_ isVariable Input - @returns True if @p graphid is a multi input graph whose last input may show up zero or more times.
- ZL_
Compressor_ ⚠Node_ getBase NodeID - @returns If the provided @p node was created by modifying another existing
node, the
ZL_NodeIDof that other node. Otherwise,ZL_NODE_ILLEGAL. - ZL_
Compressor_ ⚠Node_ getCodecID - @returns The transform ID for the node, which is the ID that is written into the frame header, and how we determine which decoder to use.
- ZL_
Compressor_ ⚠Node_ getInput0 Type - @returns The input stream type that @p node expects @pre @p node must be valid, and must have a single input stream
- ZL_
Compressor_ ⚠Node_ getInput Type - @returns The input stream type that @p node has at index @p inputIndex in the context of the @p cgraph
- ZL_
Compressor_ ⚠Node_ getLocal Params - @returns The local params of @p nodeid. @note The params for the lifetime of the @p compressor.
- ZL_
Compressor_ ⚠Node_ getMax Version - @returns the max format version that @p node supports in the context of the @p cgraph.
- ZL_
Compressor_ ⚠Node_ getMin Version - @returns the min format version that @p node supports in the context of the @p cgraph.
- ZL_
Compressor_ ⚠Node_ getName - @returns The name of the node if available, else “”, and returns NULL if @p node is invalid.
- ZL_
Compressor_ ⚠Node_ getNum Inputs - @returns The number of input streams that @p node expects in the context of the @p cgraph.
- ZL_
Compressor_ ⚠Node_ getNum Outcomes - @returns The number of output outcomes that @p node has in the context of the @p cgraph.
- ZL_
Compressor_ ⚠Node_ getNum Variable Outcomes - @returns The number of variable output that @p node has in the context of the @p cgraph.
- ZL_
Compressor_ ⚠Node_ getOutput Type - @returns The output stream type that @p node has at index @p outputIndex in the context of the @p cgraph
- ZL_
Compressor_ ⚠Node_ isStandard - @returns a boolean value indicating whether the node is standard or not.
- ZL_
Compressor_ ⚠Node_ isVariable Input - @returns True if @p nodeid is a multi input codec whose last input may show up zero or more times.
- ZL_
Compressor_ ⚠buildACE Graph - Inserts a placeholder for the Automated Compressor Explorer (ACE) to replace with an automatically generated graph. It accepts a single input of any type.
- ZL_
Compressor_ ⚠buildACE Graph2 - @see ZL_Compressor_buildACEGraph
- ZL_
Compressor_ ⚠buildACE Graph With Default - The same as
ZL_Compressor_buildACEGraph, but usesdefaultGraphto compress until it is trained. - ZL_
Compressor_ ⚠buildACE Graph With Default2 - @see ZL_Compressor_buildACEGraphWithDefault
- ZL_
Compressor_ ⚠buildSDDL Graph - Builds a Simple Data Description Language graph with the provided (pre-compiled) @p description and @p successor graph.
- ZL_
Compressor_ ⚠build Static Graph - Build a new graph out of pre-existing components. The new graph passes its data to @p headNode, and then each output of @p headNode is set to the corresponding @p successorGraph.
- ZL_
Compressor_ ⚠build Tokenize Graph - Builds a tokenize graph for the given parameters & successors.
- ZL_
Compressor_ ⚠clone Node - @brief Simplified variant of @ref ZL_Compressor_registerParameterizedNode(). Clone an existing @ref ZL_NodeID from an already registered @p nodeid but employs new parameters, set via @p localParams.
- ZL_
Compressor_ ⚠create - @brief Create a new @ref ZL_Compressor.
- ZL_
Compressor_ ⚠forEach Graph - Calls @p callback on every graph registered in the @p compressor. If @p callback returns an error, short-circuit and return that error. @returns Success if all callbacks succeed, or the first error. @note The callback will not be called on standard graphs, since they aren’t registered in the @p compressor.
- ZL_
Compressor_ ⚠forEach Node - Calls @p callback on every node registered in the @p compressor. If @p callback returns an error, short-circuit and return that error. @returns Success if all callbacks succeed, or the first error. @note The callback will not be called on standard nodes, since they aren’t registered in the @p compressor.
- ZL_
Compressor_ ⚠forEach Param - Calls @p callback on every param set in the @p compressor. If @p callback returns an error, short-circuit and return that error. @returns Success if all callbacks succeed, or the first error. @note The callback will not be called on params that are equal to the default value (0).
- ZL_
Compressor_ ⚠free - @brief Frees a @ref ZL_Compressor.
- ZL_
Compressor_ ⚠getError Context String - @returns A verbose error string containing context about the error that occurred. This is useful for debugging, and for submitting bug reports to OpenZL developers. @note This string is stored within the @p compressor and is only valid for the lifetime of the @p compressor.
- ZL_
Compressor_ ⚠getError Context String_ from Error - See @ref ZL_Compressor_getErrorContextString()
- ZL_
Compressor_ ⚠getGraph - @brief Lookup a graph by name.
- ZL_
Compressor_ ⚠getGraph Type - @returns The @ref ZL_GraphType of the given graph. @note This is the original type the graph was registered with.
- ZL_
Compressor_ ⚠getNode - @brief Lookup a node by name.
- ZL_
Compressor_ ⚠getOperation Context - ZL_
Compressor_ ⚠getParameter - @brief Read a parameter’s configured value in the Compressor and returns it.
- ZL_
Compressor_ ⚠getStarting GraphID - @param[out] graphID If the function returns true, filled with the starting GraphID, otherwise filled with ZL_GRAPH_ILLEGAL. @returns True iff the compressor has the starting GraphID set.
- ZL_
Compressor_ ⚠getWarnings - @returns The array of warnings that were encountered during the creation of the compressor. @note The array’s and the errors’ lifetimes are valid until the next non- const call on the compressor.
- ZL_
Compressor_ ⚠init Using Graph Fn - @brief Initialize a @p compressor object with a
ZL_GraphFnGraph function @p f. It will register a few custom graphs and custom nodes, and set the starting Graph ID. This is a convenience function, which is equivalent to calling the Graph function, then ZL_Compressor_selectStartingGraphID() followed by ZL_Compressor_validate() @returns Success or an error which can be checked with ZL_isError(). @param f The function used to build theZL_GraphID. - ZL_
Compressor_ ⚠parameterize Convert Serial ToStruct Node - Helper function to parameterize the
ZL_NODE_CONVERT_SERIAL_TO_STRUCTnode with the struct size. - ZL_
Compressor_ ⚠parameterize Graph - Parameterizes an existing graph by overriding its name, customGraphs, customNodes, and/or localParams.
- ZL_
Compressor_ ⚠parameterize Node - Parameterize an existing node by overriding its name and/or local parameters.
- ZL_
Compressor_ ⚠parameterize Tokenize Node - Builds a tokenize node for the given parameters.
- ZL_
Compressor_ ⚠parameterize TryParse IntGraph - Returns a parameterized version of the try parse int graph with the required successors of the graph.
- ZL_
Compressor_ ⚠register Bitunpack Node - ZL_
Compressor_ ⚠register Brute Force Selector Graph - Parameterized brute force selector that selects the best successor from a user-provided list of candidates. @param successors the list of successors to select from. Each successor must be equipped to handle the input stream type.
- ZL_
Compressor_ ⚠register Convert Serial ToString Node - ZL_
Compressor_ ⚠register Custom Tokenize Graph - Tokenize with a custom tokenization function. This is useful if you want to define a custom order for your alphabet that is neither insertion nor sorted order.
- ZL_
Compressor_ ⚠register Dispatch Node - ZL_
Compressor_ ⚠register Dispatch String Node - @param nbOutputs - the number of output streams to be generated. Passed as a local param to the transform. @param dispatchIndices - the array of indices to be used for dispatching. Will be passed as a local param to the transform. The lifetime of the array is to be managed by the caller and should outlive the transform execution.
- ZL_
Compressor_ ⚠register Divide ByNode - Creates the divide by node with its divisor set to @p divisor.
- ZL_
Compressor_ ⚠register FieldLZ Graph - DEPRECATED: Use ZL_GRAPH_FIELD_LZ instead. @returns ZL_GRAPH_FIELD_LZ
- ZL_
Compressor_ ⚠register FieldLZ Graph_ with Level - @returns ZL_GRAPH_FIELD_LZ with overridden compression level
- ZL_
Compressor_ ⚠register FieldLZ Graph_ with Literals Graph - Creates a Field LZ graph with a custom literals compressor.
- ZL_
Compressor_ ⚠register Function Graph - ZL_
Compressor_ ⚠register Function Graph2 - Registers a function graph given the @p desc.
- ZL_
Compressor_ ⚠registerMI Encoder - ZL_
Compressor_ ⚠registerMI Encoder2 - Register a custom encoder that can be used to compress.
- ZL_
Compressor_ ⚠register Merge Sorted Graph - Creates a graph for ZL_NODE_MERGE_SORTED that first detects whether the input has <= 64 sorted runs. If it does it selects the node. Otherwise it selects the backupGraph.
- ZL_
Compressor_ ⚠register Parameterized Graph - @brief Create a new GraphID by the one from @p gid, just replacing the @p localParams by the provided ones. Used to create custom variants of Standard Graphs for example.
- ZL_
Compressor_ ⚠register Parameterized Node - @brief Clone an existing @ref ZL_NodeID from an existing node, but optionally with a new name & new parameters.
- ZL_
Compressor_ ⚠register Pipe Encoder - Register a custom pipe encoder, to be employed in upcoming Graph. This registration is specialized for simple pipe transforms. Counterpart: ZL_DCtx_registerPipeDecoder(). This action creates a NodeID, provided as @return value. Graphs using custom encoders are only decodable if, at decompression time, a custom decoder of same CTid is registered.
- ZL_
Compressor_ ⚠register Selector Graph - ZL_
Compressor_ ⚠register Selector Graph2 - Register a selector graph given the @p desc.
- ZL_
Compressor_ ⚠register Serial Selector Graph - ZL_
Compressor_ ⚠register Split ByStruct Graph - Split-by-struct This operation splits a serialized input defined as an array of structures of fixed size, by grouping same fields into their own stream. All fields are considered concatenated back-to-back (no alignment). For this transform to work, input must be an exact multiple of struct_size, with struct_size = sum(field_sizes). Each output stream is then assigned a successor Graph.
- ZL_
Compressor_ ⚠register Split Encoder - Register a custom Split Transform
- ZL_
Compressor_ ⚠register Split Graph - Split-by-param
This operation splits a serialized input
into segments, defined by array @segmentSizes[].
The nb of segments and their size is static,
except for the last segment size, which can receive a size value
0, meaning “whatever is left in the stream”. Each segment is then into its own output, and then sent to the next processing stage defined by @successors[]. - ZL_
Compressor_ ⚠register Split Node_ with Params - ZL_
Compressor_ ⚠register Split Node_ with Parser - ZL_
Compressor_ ⚠register Static Graph - This is the more complete declaration variant, offering more control and capabilities. In order to be valid, a Static Graph Description must :
- ZL_
Compressor_ ⚠register Static Graph_ from Node - @brief Create a graph from a head node.
- ZL_
Compressor_ ⚠register Static Graph_ from Node1o - @brief Create a graph from a single input & output node.
- ZL_
Compressor_ ⚠register Static Graph_ from Pipeline Nodes1o - @brief Creates a graph consisting of a series of nodes executed in succession in the order provided and then sent to @p dstGraph.
- ZL_
Compressor_ ⚠register Tokenize Graph - @see ZL_Compressor_buildTokenizeGraph @returns The tokenize graph, or ZL_GRAPH_ILLEGAL on error.
- ZL_
Compressor_ ⚠register Transpose Split Graph - Helper function to create a graph for ZL_NODE_TRANSPOSE_SPLIT.
- ZL_
Compressor_ ⚠register Typed Encoder - Register a custom Typed Transform, to be employed in upcoming graph.
- ZL_
Compressor_ ⚠register Typed Encoder2 - Register a custom encoder that can be used to compress.
- ZL_
Compressor_ ⚠registerVO Encoder - ZL_
Compressor_ ⚠registerVO Encoder2 - Register a custom encoder that can be used to compress.
- ZL_
Compressor_ ⚠register Zstd Graph_ with Level - @return zstd graph with a compression level overridden
- ZL_
Compressor_ ⚠select Starting GraphID - @brief Selects a graph as the default entry point for the compressor.
- ZL_
Compressor_ ⚠setParameter - @brief Set global parameters via @p compressor. In this construction, global parameters are attached to a Compressor object. Global Parameters set at Compressor level can be overridden later at CCtx level.
- ZL_
Compressor_ ⚠validate - @brief Validates a graph maintains basic invariants to reduce the chance of errors being triggered when compressing.
- ZL_
Custom ⚠Tokenize State_ create Alphabet Output - Creates the alphabet stream to store the tokenized alphabet. The width of each element in the alphabet must be the same width as the input stream.
- ZL_
Custom ⚠Tokenize State_ create Index Output - Creates the index stream with the given width. The index stream must contain exactly the same number of elements as the input.
- ZL_
Custom ⚠Tokenize State_ getOpaque Ptr - @returns The opaque pointer passed into @fn ZS2_createGraph_customTokenize().
- ZL_
DCtx_ ⚠create - @brief Creates a new decompression context.
- ZL_
DCtx_ ⚠decompress - @brief Decompresses data with explicit state management.
- ZL_
DCtx_ ⚠decompress MultiT Buffer - @brief Decompresses a frame into multiple TypedBuffers.
- ZL_
DCtx_ ⚠decompressT Buffer - @brief Decompresses a frame with a single typed output into a TypedBuffer.
- ZL_
DCtx_ ⚠decompress Typed - @brief Decompresses typed content from frames with a single typed output into a pre-allocated buffer @p dst . Information about output type is written into @p outputInfo .
- ZL_
DCtx_ ⚠free - @brief Frees a decompression context.
- ZL_
DCtx_ ⚠getError Context String - @brief Gets a verbose error string containing context about the error.
- ZL_
DCtx_ ⚠getError Context String_ from Error - @brief Gets error context string from error code.
- ZL_
DCtx_ ⚠getOperation Context - ZL_
DCtx_ ⚠getParameter - @brief Reads a parameter’s configured value in the decompression context.
- ZL_
DCtx_ ⚠getWarnings - @brief Gets the array of warnings from the previous operation.
- ZL_
DCtx_ ⚠registerMI Decoder - Register an MI decoder transform. Counterpart to ZS2_registerMITransform().
- ZL_
DCtx_ ⚠register Pipe Decoder - Register a custom decoder transform, should it be needed during decompression of a zstrong frame. A decoder transform is expected to reverse the encoding transform of same @CTid. This function is specialized for the registration of simple pipe decoder transforms. Counterpart to ZL_Compressor_registerPipeEncoder().
- ZL_
DCtx_ ⚠register Split Decoder - Register a custom split decoder transform. This is supposed to be the reverse of the encoding transform of same @CTid. Counterpart to ZS2_registerSplitTransform().
- ZL_
DCtx_ ⚠register Typed Decoder - Register a custom typed decoder transform. Counterpart to ZS2_registerTypedTransform().
- ZL_
DCtx_ ⚠registerVO Decoder - Register a variable output decoder transform. Counterpart to ZS2_registerVOTransform().
- ZL_
DCtx_ ⚠reset Parameters - @brief Resets parameters selection from a blank slate.
- ZL_
DCtx_ ⚠setParameter - @brief Sets global parameters via the decompression context.
- ZL_
DCtx_ ⚠setStream Arena - ZL_
Data ⚠Info_ getConsumer Codec - @returns The transform that consumes this stream or NULL if the stream is an input stream to the frame.
- ZL_
Data ⚠Info_ getContent Size - @returns The content size of the stream. For non-string streams equal to nbElts * eltWidth. For string streams equal to the sum of the lengths.
- ZL_
Data ⚠Info_ getData Ptr - @returns The data pointer for the stream.
- ZL_
Data ⚠Info_ getElt Width - @returns The element width of the stream.
- ZL_
Data ⚠Info_ getIndex - @returns The index for which ZL_ReflectionCtx_getStream_lastChunk() returns this stream.
- ZL_
Data ⚠Info_ getLengths Ptr - @returns The length pointer for the stream if the type is ZL_Type_string. @pre The type is ZL_Type_string.
- ZL_
Data ⚠Info_ getNum Elts - @returns The number of elements in the stream.
- ZL_
Data ⚠Info_ getProducer Codec - @returns The transform that produced this stream or NULL if the stream is stored in the frame.
- ZL_
Data ⚠Info_ getType - @returns The type of the stream.
- ZL_
Data_ ⚠commit - @brief Commit the number of elements written into @p data.
- ZL_
Data_ ⚠content Size - @return the nb of bytes committed into data’s buffer
(generally
== data->eltWidth * data->nbElts). - ZL_
Data_ ⚠eltWidth - @return element width in nb of bytes
This is only valid for fixed size elements,
such as
ZL_Type_structorZL_Type_numeric. If Type isZL_Type_string, it returns 0 instead. - ZL_
Data_ ⚠getInt Metadata - ZL_
Data_ ⚠id - ZL_
Data_ ⚠numElts - @note invoking
ZL_Data_numElts()is only valid for committed Data. If the Data object was received as an input, it’s necessarily valid. So the issue can only happen for outputs, between allocation and commit. QueryingZL_Data_numElts()is not expected to be useful for output Data. @noteZL_Type_serialdoesn’t really have a concept of “elt”. In this case, it returns Data size in bytes. - ZL_
Data_ ⚠rPtr - These methods provide direct access to internal buffer.
Warning : users must pay attention to buffer boundaries.
@return pointer to the beginning of buffer.
@note for
ZL_Type_string, returns a pointer to the buffer containing the concatenated strings. - ZL_
Data_ ⚠rString Lens - This method is only valid for
ZL_Type_stringData. @return a pointer to the array of string lengths. The size of this array is== ZL_Data_numElts(data). @returnNULLif incorrect data type, orStringLensnot allocated yet. - ZL_
Data_ ⚠reserve String Lens - This method is only valid for
ZL_Type_stringData. It reserves memory space for StringLens array, and returns a pointer to it. The buffer is owned by @p data and has the same lifetime. The returned pointer can be used to write into the array. After writing into the array, the nb of String Lengths provided must be signaled using @ref ZL_Data_commit(). This method will fail if StringLens is already allocated. @returnNULLif incorrect data type, or allocation error. - ZL_
Data_ ⚠setInt Metadata - @brief Sets integer metadata with the key @p mId and value @p mvalue on the stream.
- ZL_
Data_ ⚠type - ZL_
Data_ ⚠wPtr - ZL_
Data_ ⚠wString Lens - This method is only valid for
ZL_Type_stringData. It requires write access into StringLens array. Only valid if StringLens array has already been allocated and not yet written into. @return NULL when any of the above conditions is violated. - ZL_
Decoder_ ⚠create1 OutStream - ZL_
Decoder_ ⚠create1 String Stream - ZL_
Decoder_ ⚠create String Stream - ZL_
Decoder_ ⚠create Typed Stream - ZL_
Decoder_ ⚠getCodec Header - ZL_
Decoder_ ⚠getOpaque Ptr - @returns The opaque pointer provided in the transform description. @warning Usage of the opaque pointer must be thread-safe, and must not not modify the state in any way that impacts decoding!
- ZL_
Decoder_ ⚠getOperation Context - ZL_
Decoder_ ⚠getScratch Space - ZL_
Decoder_ ⚠getState - @returns Returns a state, as generated by the Transform’s State Manager.
- ZL_
Dispatch ⚠State_ getOpaque Ptr - Provides an opaque pointer that can be useful to provide state to the parser. For example, it can be used by language bindings to allow parsers written in languages other than C.
- ZL_
Dispatch ⚠State_ malloc - ZL_
Dispatch ⚠State_ return Error - @returns An error from the parser function and places the @p message into Zstrong’s error context.
- ZL_
Dispatch ⚠String_ maxDispatches - Convenience function to get the maximum number of dispatches supported by the current encoder version.
- ZL_
E_ ⚠addFrame_ public - Attempts to add more information to the error represented by @p error. Narrowly, this means trying to append a stack frame to the stacktrace that rich errors accumulate. In service of that, it also tries to up-convert the error to a rich error if it isn’t already. @p fmt and optional additional following args can also be used to append an arbitrary formatted string of information into the error.
- ZL_
E_ ⚠append ToMessage - Append a formatted string to the error’s message. May be a no-op if the error doesn’t have a rich error info set up internally.
- ZL_
E_ ⚠create - Actual implementation function which accepts all of the explicit arguments that are set up for you by the macros elsewhere. Prefer to use those macros rather than this function directly.
- ZL_
Edge_ ⚠getData - ZL_
Edge_ ⚠getOperation Context - ZL_
Edge_ ⚠runConvert Serial ToString Node - ZL_
Edge_ ⚠runDispatch Node - Run the DispatchN node in the context of a dynamic graph, following runtime-defined @p instructions.
- ZL_
Edge_ ⚠runDispatch String Node - Run the ZL_NODE_DISPATCH_STRING Node in the context of a Dynamic Graph, applying runtime defined parameters.
- ZL_
Edge_ ⚠runMulti Input Node - ZL_
Edge_ ⚠runMulti Input Node_ with Params - ZL_
Edge_ ⚠runNode - ZL_
Edge_ ⚠runNode_ with Params - ZL_
Edge_ ⚠runSplit Node - Run the SplitN node within the context of a dynamic graph, applying runtime-defined @p segmentSizes parameters.
- ZL_
Edge_ ⚠runTranspose Split - ZL_
Edge_ ⚠setDestination - ZL_
Edge_ ⚠setInt Metadata - @brief Sets the int metadata for the edge to @p mValue
- ZL_
Edge_ ⚠setParameterized Destination - @brief Sets the destination of the provided edges to the provided graph ID, overriding its behavior with the provided parameters.
- ZL_
Encoder_ ⚠create AllOut Buffers - ZL_
Encoder_ ⚠create String Stream - ZL_
Encoder_ ⚠create Typed Stream - ZL_
Encoder_ ⚠getC Param - ZL_
Encoder_ ⚠getLocal Copy Param - ZL_
Encoder_ ⚠getLocal IntParam - ZL_
Encoder_ ⚠getLocal IntParams - ZL_
Encoder_ ⚠getLocal Param - ZL_
Encoder_ ⚠getLocal Params - ZL_
Encoder_ ⚠getOpaque Ptr - @returns The opaque pointer provided in the transform description. @warning Usage of the opaque pointer must be thread-safe, and must not not modify the state in any way that impacts encoding!
- ZL_
Encoder_ ⚠getOperation Context - ZL_
Encoder_ ⚠getScratch Space - ZL_
Encoder_ ⚠getState - @returns Returns a state, as generated by the Transform’s State Manager. The state’s lifetime is managed by the host CCtx, it will be free automatically at end of CCtx lifetime (and can’t be forcefully free manually). The state may be cached from a previous run with a compatible transform (same state signature).
- ZL_
Encoder_ ⚠send Codec Header - ZL_
Error ⚠Code_ toString - ZL_
Error ⚠Context_ getOperation Context - ZL_
Frame ⚠Info_ create - @brief Creates a frame information object from compressed data.
- ZL_
Frame ⚠Info_ free - @brief Frees a frame information object.
- ZL_
Frame ⚠Info_ getDecompressed Size - @brief Gets the decompressed size of a specific output.
- ZL_
Frame ⚠Info_ getFormat Version - @brief Gets the format version of the frame.
- ZL_
Frame ⚠Info_ getNum Elts - @brief Gets the number of elements in a specific output.
- ZL_
Frame ⚠Info_ getNum Outputs - @brief Gets the number of regenerated outputs on decompression.
- ZL_
Frame ⚠Info_ getOutput Type - @brief Gets the output type for a specific output ID.
- ZL_
GraphID_ ⚠isValid - Registration might fail if the Descriptor is incorrectly filled, Any further operation attempted with such a Graph will also fail. Such an outcome can be tested with ZL_GraphID_isValid(). Note: this is mostly for debugging purposes, once a Descriptor is valid, registration can be assumed to be successful.
- ZL_
Graph_ ⚠getC Param - ZL_
Graph_ ⚠getCustom Graphs - ZL_
Graph_ ⚠getCustom Nodes - ZL_
Graph_ ⚠getLocal IntParam - ZL_
Graph_ ⚠getLocal RefParam - ZL_
Graph_ ⚠getOpaque Ptr - ZL_
Graph_ ⚠getOperation Context - ZL_
Graph_ ⚠getScratch Space - ZL_
Graph_ ⚠getTranspose Split Node - @returns a NodeID that implements transpose split for the given @p eltWidth that will work with any Zstrong format version. If no node exists, then returns ZL_NODE_ILLEGAL. This can happen for format version <= 10 when @p eltWidth != 2,4,8.
- ZL_
Graph_ ⚠isNode Supported - Determines whether @nodeid is supported given the applied global parameters for the compression. Notably the ZL_CParam_formatVersion parameter can determine if a node is valid for the given encoding version.
- ZL_
Graph_ ⚠tryGraph - @brief Attempt compression using a graph and return the performance.
- ZL_
Graph_ ⚠tryMulti Input Graph - @brief Attempt compression using a graph and return the performance.
- ZL_
Input_ ⚠content Size - @return the nb of bytes committed into data’s buffer
(generally
== data->eltWidth * data->nbElts). - ZL_
Input_ ⚠eltWidth - @return element width in nb of bytes
This is only valid for fixed size elements,
such as
ZL_Type_structorZL_Type_numeric. If Type isZL_Type_string, it returns 0 instead. - ZL_
Input_ ⚠getInt Metadata - @returns The value if present. ZL_IntMetadata::isPresent != 0 when the @p key exists, in which case ZL_IntMetadata::mValue is set to the value.
- ZL_
Input_ ⚠id - ZL_
Input_ ⚠numElts - @note invoking
ZL_Data_numElts()is only valid for committed Data. If the Data object was received as an input, it’s necessarily valid. So the issue can only happen for outputs, between allocation and commit. QueryingZL_Data_numElts()is not expected to be useful for output Data. @noteZL_Type_serialdoesn’t really have a concept of “elt”. In this case, it returns Data size in bytes. - ZL_
Input_ ⚠ptr - These methods provide direct access to internal buffer.
Warning : users must pay attention to buffer boundaries.
@return pointer to the beginning of buffer.
@note for
ZL_Type_string, returns a pointer to the buffer containing the concatenated strings. - ZL_
Input_ ⚠setInt Metadata - @brief Sets integer metadata with the key @p key and value @p value on the stream.
- ZL_
Input_ ⚠string Lens - This method is only valid for
ZL_Type_stringData. @return a pointer to the array of string lengths. The size of this array is== ZL_Data_numElts(data). @returnNULLif incorrect data type, orStringLensnot allocated yet. - ZL_
Input_ ⚠type - ZL_
NULL_ ⚠getOperation Context - ZL_
NodeID_ ⚠isValid - Registration might fail, for example if the Descriptor is incorrectly filled. In which case, the returned nodeid is ZL_NODE_ILLEGAL. Any further operation attempted with such a Node will also fail. Such an outcome can be tested with ZL_NodeID_isValid(). Note: this is mostly for debugging, once a Descriptor is valid, registration can be assumed to remain successful.
- ZL_
Node_ ⚠convert Serial ToNumBE - Convert from serial to
bitWidth-bit big-endian numeric data. - ZL_
Node_ ⚠convert Serial ToNumLE - Convert from serial to
bitWidth-bit little-endian numeric data. - ZL_
Node_ ⚠interpret AsLE - ZL_
Operation ⚠Context_ getDefault Error Context - ZL_
Output_ ⚠commit - @brief Commit the number of elements written into @p data.
- ZL_
Output_ ⚠const Ptr - @returns a const pointer to the beginning of the buffer.
It returns NULL if the output does not have a buffer attached to it yet.
This cannot happen within a custom codec.
Warning : users must pay attention to buffer boundaries.
@note for
ZL_Type_string, returns a pointer to the buffer containing the concatenated strings. - ZL_
Output_ ⚠const String Lens - @returns A const pointer to the array containing lengths for string-typed outputs. It returns NULL if the output is not of type string.
- ZL_
Output_ ⚠content Capacity - @returns The capacity of the buffer reserved for @p output in bytes. If @p output has not been reserved, it returns an error. For string types, this is the sum of the lengths of each string that can be written into the buffer.
- ZL_
Output_ ⚠content Size - @returns The content size in bytes that has been committed to @p output. For non-string types, this is the eltWidth * numElts. For string types, this is the sum of the lengths of each stream. If @p output has not been commited, it returns an error.
- ZL_
Output_ ⚠eltWidth - @returns The element width of the @p output if it has a buffer reserved, otherwise it returns NULL. Within a custom codec, this function always succeeds, because the output always has a buffer reserved. If the type of the output is String, it returns 0 instead.
- ZL_
Output_ ⚠elts Capacity - @returns The capacity of the buffer reserved for @p output in number of elements. If @p output has not been reserved, it returns an error. For string types, this is the number of strings that can be written into the buffer.
- ZL_
Output_ ⚠getInt Metadata - @returns The value if present. ZL_IntMetadata::isPresent != 0 when the @p key exists, in which case ZL_IntMetadata::mValue is set to the value.
- ZL_
Output_ ⚠id - ZL_
Output_ ⚠numElts - @returns The number of elements committed in @p output if it has been committed. Otherwise, returns an error if the write to @p output has not been committed.
- ZL_
Output_ ⚠ptr - These methods provide direct access to internal buffer.
Warning : users must pay attention to buffer boundaries.
@return pointer to buffer position to resume writing.
@note for
ZL_Type_string, returns a pointer to the buffer containing the concatenated strings. - ZL_
Output_ ⚠reserve String Lens - This method is only valid for
ZL_Type_stringData. It reserves memory space for StringLens array, and returns a pointer to it. The buffer is owned by @p data and has the same lifetime. The returned pointer can be used to write into the array. After writing into the array, the nb of String Lengths provided must be signaled using @ref ZL_Output_commit(). This method will fail if StringLens is already allocated. @returnNULLif incorrect data type, or allocation error. - ZL_
Output_ ⚠setInt Metadata - @brief Sets integer metadata with the key @p key and value @p value on the stream.
- ZL_
Output_ ⚠string Lens - This method is only valid for
ZL_Type_stringData. It requests write access into StringLens array. Only valid if StringLens array has already been allocated. @return pointer to array position to resume writing. or NULL if any of above conditions is violated. - ZL_
Output_ ⚠type - ZL_
Reflection ⚠Ctx_ create - ZL_
Reflection ⚠Ctx_ free - ZL_
Reflection ⚠Ctx_ getCodec_ last Chunk - @returns The transform at @p index @pre ZL_ReflectionCtx_setCompressedFrame() returned success. @pre @p index is valid.
- ZL_
Reflection ⚠Ctx_ getD Ctx - @returns The dctx that will be used for decompression so the user can set parameters and register custom transforms if the helpers provided aren’t sufficient.
- ZL_
Reflection ⚠Ctx_ getFrame Footer Size - @returns The size of the frame footer. @pre ZL_ReflectionCtx_setCompressedFrame() returned success.
- ZL_
Reflection ⚠Ctx_ getFrame Format Version - @returns The frame format version. @pre ZL_ReflectionCtx_setCompressedFrame() returned success.
- ZL_
Reflection ⚠Ctx_ getFrame Header Size - @returns The size of the frame header. @pre ZL_ReflectionCtx_setCompressedFrame() returned success.
- ZL_
Reflection ⚠Ctx_ getInput - @returns The input stream at @p index @pre ZL_ReflectionCtx_setCompressedFrame() returned success. @pre @p index is valid.
- ZL_
Reflection ⚠Ctx_ getNum Codecs_ last Chunk - @returns the number of transforms that are run during the decoding process. @pre ZL_ReflectionCtx_setCompressedFrame() returned success.
- ZL_
Reflection ⚠Ctx_ getNum Inputs - @returns The number of input streams to the compressed frame. @pre ZL_ReflectionCtx_setCompressedFrame() returned success.
- ZL_
Reflection ⚠Ctx_ getNum Stored Outputs_ last Chunk - @returns The number of streams stored in the compressed frame. @pre ZL_ReflectionCtx_setCompressedFrame() returned success.
- ZL_
Reflection ⚠Ctx_ getNum Streams_ last Chunk - @returns The total number of streams in the decoder graph. This includes streams stored in the frame, input streams to the frame, and intermediate streams. @pre ZL_ReflectionCtx_setCompressedFrame() returned success.
- ZL_
Reflection ⚠Ctx_ getStored Output_ last Chunk - @returns The stored stream at @p index @pre ZL_ReflectionCtx_setCompressedFrame() returned success. @pre @p index is valid.
- ZL_
Reflection ⚠Ctx_ getStream_ last Chunk - @returns The stream at @p index @pre ZL_ReflectionCtx_setCompressedFrame() returned success. @pre @p index is valid.
- ZL_
Reflection ⚠Ctx_ getTotal Transform Header Size_ last Chunk - @returns The total size of all the transform headers. @pre ZL_ReflectionCtx_setCompressedFrame() returned success.
- ZL_
Reflection ⚠Ctx_ registerMI Decoder - Registers a custom transform to be used when decoding the frame. @pre Must be called before ZL_ReflectionCtx_setCompressedFrame().
- ZL_
Reflection ⚠Ctx_ register Typed Decoder - Registers a custom transform to be used when decoding the frame. @pre Must be called before ZL_ReflectionCtx_setCompressedFrame().
- ZL_
Reflection ⚠Ctx_ registerVO Decoder - Registers a custom transform to be used when decoding the frame. @pre Must be called before ZL_ReflectionCtx_setCompressedFrame().
- ZL_
Reflection ⚠Ctx_ setCompressed Frame - Decompresses the frame in @p src and build all the information needed to introspect the frame.
- ZL_
Result_ ⚠ZL_ Compressor Deserializer_ Dependencies_ extract - ZL_
Result_ ⚠ZL_ Edge List_ extract - ZL_
Result_ ⚠ZL_ GraphID_ extract - ZL_
Result_ ⚠ZL_ Graph Performance_ extract - ZL_
Result_ ⚠ZL_ NodeID_ extract - ZL_
Result_ ⚠size_ t_ extract - ZL_
Selector_ ⚠getC Param - ZL_
Selector_ ⚠getInput0 Mask ForGraph - Utility function to get the input types supported by @gid as an input mask. Throws an error if @gid is not valid or does not have exactly one input. See ZL_Compressor_Graph_getInput0Mask() for more details.
- ZL_
Selector_ ⚠getLocal Copy Param - ZL_
Selector_ ⚠getLocal IntParam - ZL_
Selector_ ⚠getLocal IntParams - ZL_
Selector_ ⚠getLocal Param - ZL_
Selector_ ⚠getOpaque Ptr - ZL_
Selector_ ⚠getScratch Space - ZL_
Selector_ ⚠setSuccessor Params - ZL_
Selector_ ⚠tryGraph - ZL_
SetString ⚠Lens State_ getOpaque Ptr - ZL_
SetString ⚠Lens State_ malloc - ZL_
Split ⚠State_ getOpaque Ptr - Provides an opaque pointer that can be useful to provide state to the parser. For example, it can be used by language bindings to allow parsers written in languages other than C.
- ZL_
Split ⚠State_ malloc - ZL_
Typed ⚠Buffer_ byte Size - @brief Gets the number of bytes written into the internal buffer.
- ZL_
Typed ⚠Buffer_ create - @brief Creates an empty typed buffer object.
- ZL_
Typed ⚠Buffer_ create Wrap Numeric - @brief Creates a pre-allocated typed buffer for numeric data.
- ZL_
Typed ⚠Buffer_ create Wrap Serial - @brief Creates a pre-allocated typed buffer for serial data.
- ZL_
Typed ⚠Buffer_ create Wrap String - @brief Creates a pre-allocated ZL_TypedBuffer for String data.
- ZL_
Typed ⚠Buffer_ create Wrap Struct - @brief Creates a pre-allocated typed buffer for struct data.
- ZL_
Typed ⚠Buffer_ eltWidth - @brief Gets the size of each element for fixed-size types.
- ZL_
Typed ⚠Buffer_ free - @brief Frees a typed buffer object.
- ZL_
Typed ⚠Buffer_ numElts - @brief Gets the number of elements in the typed buffer.
- ZL_
Typed ⚠Buffer_ rPtr - @brief Gets direct access to the internal buffer for reading operation.
- ZL_
Typed ⚠Buffer_ rString Lens - @brief Gets pointer to the array of string lengths.
- ZL_
Typed ⚠Buffer_ type - @brief Gets the type of the typed buffer.
- ZL_
Typed ⚠Ref_ create Numeric - Creates a
ZL_TypedRefthat references an array of numeric values, employing the local host’s endianness. Supported widths are 1, 2, 4, and 8 and the input array must be properly aligned (in local ABI). - ZL_
Typed ⚠Ref_ create Serial - Creates a
ZL_TypedRefthat represents a regular buffer of bytes. - ZL_
Typed ⚠Ref_ create String - Creates a
ZL_TypedRefreferencing a “flat-strings” representation. All “strings” are concatenated into @p strBuffer and their lengths are stored in a @p strLens array. - ZL_
Typed ⚠Ref_ create Struct - Creates a
ZL_TypedRefthat represents a concatenated list of fields of a fixed size of @p structWidth. - ZL_
Typed ⚠Ref_ free - Frees the given
ZL_TypedRef. - ZL_
codemod ⚠Const Data AsOutput - ZL_
codemod ⚠Const Datas AsOutputs - ZL_
codemod ⚠Const Output AsData - ZL_
codemod ⚠Data AsInput - ZL_
codemod ⚠Data AsOutput - ZL_
codemod ⚠Datas AsInputs - ZL_
codemod ⚠Input AsData - ZL_
codemod ⚠Inputs AsDatas - ZL_
codemod ⚠MutData AsInput - ZL_
codemod ⚠MutInput AsData - ZL_
codemod ⚠Output AsData - ZL_
codemod ⚠Outputs AsDatas - ZL_
compress ⚠Bound - Provides the upper bound for the compressed size needed to ensure that compressing @p totalSrcSize is successful. When compressing multiple inputs, @p totalSrcSize must be the sum of the size of each input.
- ZL_
compress_ ⚠using Compressor - ZL_
compress_ ⚠using Graph Fn - @brief compresses using @param graphFunction that both defines a custom graph and sets global parameters.
- ZL_
decompress ⚠ - @brief Decompresses a frame hosting a single serialized output.
- ZL_
error ⚠Code - @returns The error code contained within the report. If !ZL_isError(report), then @returns ZL_ErrorCode_no_error.
- ZL_
getCompressed ⚠Size - @brief Gets the size of the compressed frame. This method could be useful when the compressed frame only represents a first portion of a larger buffer.
- ZL_
getDecompressed ⚠Size - @brief Gets the decompressed size of content from a single-output frame.
- ZL_
getDefault ⚠Encoding Version - @returns The current encoding version number. This version number is used when the version number is unset.
- ZL_
getFormat ⚠Version From Frame - Reads the magic number from the frame and returns the format version.
- ZL_
getHeader ⚠Size - @brief Gets the size of the OpenZL header.
- ZL_
getNum ⚠Outputs - @brief Gets the number of outputs stored in a compressed frame.
- ZL_
getOutput ⚠Type - @brief Gets the output type for single-output frames.
- ZL_
isError ⚠ - @returns true iff the report contains an error
- ZL_
report ⚠Error - ZL_
return ⚠Error - @returns a specific ZL_ErrorCode as a ZL_Report return type.
- ZL_
return ⚠Success - @returns a successful report without a value (set to zero).
- ZL_
return ⚠Value - @returns a successful report containing a value.
- ZL_
valid ⚠Result - @pre !ZL_isError(report) @returns The value contained within the report
Type Aliases§
- ZL_CCtx
- ZL_
CParam - The list of global compression parameters
- ZL_
Codec Info - ZL_
Codec State Alloc - ZL_
Codec State Free - ZL_
Compress Introspection Hooks - ZL_
Compressor - @defgroup Group_Compressor_LifetimeManagement Lifetime Management
- ZL_
Compressor Deserializer - ZL_
Compressor Serializer - ZL_
Compressor_ ForEach Graph Callback - ZL_
Compressor_ ForEach Node Callback - ZL_
Compressor_ ForEach Param Callback - ZL_
Custom Tokenize Fn - A custom tokenization function to tokenize the input. The output of this function is not checked in production builds, and it is UB to tokenize incorrectly.
- ZL_
Custom Tokenize State - ZL_DCtx
- @brief Decompression context for state management (incomplete type).
- ZL_
DParam - @brief Global decompression parameters.
- ZL_Data
- ZL_
Data Arena Type - ZL_
Data Info - ZL_
Decoder - ZL_
Dispatch Parser Fn - ZL_
Dispatch State - ZL_
Dynamic Error Info - Forward Declarations *
- ZL_Edge
- ZL_
Encoder - ZL_
Error - ZL_Error:
- ZL_
Error Code - ZL_ErrorCode *
- ZL_
Error Info - Internally, there are two kinds of error info objects: dynamic and static, which are, like they sound, respectively dynamically allocated (and which must be freed) or statically allocated, but which therefore can’t contain any runtime information.
- ZL_
Function Graph Fn - The function signature for function graphs.
- ZL_
Function Graph Validate Fn - ZL_
Graph - ZL_
Graph Fn - @brief While it’s possible to add elements (graphs, selectors or nodes) to a Compressor one by one, and then finalize it by selecting a starting graph ID, it’s generally common for all these steps to be regrouped into a single initialization function. The following signature corresponds such a function. It returns a GraphID which, by convention, is the starting GraphID.
- ZL_
Graph Parameters - @defgroup Group_Compressor_GraphCustomization Graph Customization
- ZL_
Graph Type - ZL_
IDType - ZL_
Input - ZL_
MIDecoder Fn - ZL_
MIEncoder Fn - ZL_
Operation Context - ZL_
Output - ZL_
Pipe Decoder Fn - ZL_
Pipe DstCapacity Fn - ZL_
Pipe Encoder Fn - ZL_
Reflection Ctx - Reflection API for introspecting a compressed frame.
- ZL_
Report - ZL_
Result_ ZL_ Compressor Deserializer_ Dependencies - ZL_
Result_ ZL_ Compressor Deserializer_ Dependencies_ fake_ type_ needs_ semicolon - ZL_
Result_ ZL_ Edge List - ZL_
Result_ ZL_ Edge List_ fake_ type_ needs_ semicolon - ZL_
Result_ ZL_ GraphID - ZL_
Result_ ZL_ GraphID_ fake_ type_ needs_ semicolon - ZL_
Result_ ZL_ Graph Performance - ZL_
Result_ ZL_ Graph Performance_ fake_ type_ needs_ semicolon - ZL_
Result_ ZL_ NodeID - ZL_
Result_ ZL_ NodeID_ fake_ type_ needs_ semicolon - ZL_
Result_ size_ t - ZL_
Result_ size_ t_ fake_ type_ needs_ semicolon - ZL_
Runtime Graph Parameters - @defgroup Group_Compressor_GraphCustomization Graph Customization
- ZL_
Selector - ZL_
Selector Fn - ZL_
Serial Selector Fn - ZL_
SetString Lens Parser Fn - ZL_
SetString Lens State - ZL_
Split Decoder Fn - ZL_
Split DstCapacity Fn - ZL_
Split Encoder Fn - ZL_
Split Parser Fn - ZL_
Split State - ZL_
Standard GraphID - ZL_
Standard NodeID - ZL_
Static Error Info - ZL_StaticErrorInfo *
- ZL_
Ternary Param - ZL_Type
- Any Data object has necessary a Type.
The least specific Type is
ZL_Type_serial, which means it’s just a blob of bytes. Codecs can only accept and produce specified data Types. In contrast, Selectors & Graphs may optionally accept multiple data Types, using bitmap masking (example:ZL_Type_struct | ZL_Type_numeric). - ZL_
Typed Buffer - @brief Typed buffer object that can own and auto-size their buffers.
- ZL_
Typed Decoder Fn - ZL_
Typed Encoder Fn - ZL_
Typed Ref - ZL_
VODecoder Fn - ZL_
VOEncoder Fn - _bindgen_
ty_ 1 - _bindgen_
ty_ 2
Unions§
- ZL_
Edge List__ bindgen_ ty_ 1 - ZL_
Edge List__ bindgen_ ty_ 2 - ZL_
Error Info_ u - Internally, there are two kinds of error info objects: dynamic and static, which are, like they sound, respectively dynamically allocated (and which must be freed) or statically allocated, but which therefore can’t contain any runtime information.
- ZL_
Result_ ZL_ Compressor Deserializer_ Dependencies_ u - ZL_
Result_ ZL_ Edge List_ u - ZL_
Result_ ZL_ GraphID_ u - ZL_
Result_ ZL_ Graph Performance_ u - ZL_
Result_ ZL_ NodeID_ u - ZL_
Result_ size_ t_ u