279 lines
78 KiB
HTML
279 lines
78 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Low-level bindings to the zstd library."><meta name="keywords" content="rust, rustlang, rust-lang, zstd_sys"><title>zstd_sys - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../dark.css" disabled><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../storage.js"></script><script src="../crates.js"></script><script defer src="../main.js"></script>
|
||
<noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../favicon.svg"></head><body class="rustdoc mod crate"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a class="sidebar-logo" href="../zstd_sys/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.png" alt="logo"></div>
|
||
</a><h2 class="location">Crate zstd_sys</h2><div class="block version"><div class="narrow-helper"></div><p>Version 1.6.3+zstd.1.5.2</p></div><div class="sidebar-elems"><a id="all-types" href="all.html"><p>See all zstd_sys's items</p></a><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#constants">Constants</a></li><li><a href="#functions">Functions</a></li><li><a href="#types">Type Definitions</a></li></ul></div><div id="sidebar-vars" data-name="zstd_sys" data-ty="mod" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../zstd_sys/index.html"><img class="rust-logo" src="../rust-logo.png" alt="logo"></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">Crate <a class="mod" href="#">zstd_sys</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/zstd_sys/lib.rs.html#1-46" title="goto source code">[src]</a></span></h1><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Low-level bindings to the <a href="https://facebook.github.io/zstd/">zstd</a> library.</p>
|
||
</div></details><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2>
|
||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.ZDICT_params_t.html" title="zstd_sys::ZDICT_params_t struct">ZDICT_params_t</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.ZSTD_CCtx_s.html" title="zstd_sys::ZSTD_CCtx_s struct">ZSTD_CCtx_s</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.ZSTD_CDict_s.html" title="zstd_sys::ZSTD_CDict_s struct">ZSTD_CDict_s</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.ZSTD_DCtx_s.html" title="zstd_sys::ZSTD_DCtx_s struct">ZSTD_DCtx_s</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.ZSTD_DDict_s.html" title="zstd_sys::ZSTD_DDict_s struct">ZSTD_DDict_s</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.ZSTD_bounds.html" title="zstd_sys::ZSTD_bounds struct">ZSTD_bounds</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.ZSTD_inBuffer_s.html" title="zstd_sys::ZSTD_inBuffer_s struct">ZSTD_inBuffer_s</a></div><div class="item-right docblock-short"><p>Streaming</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.ZSTD_outBuffer_s.html" title="zstd_sys::ZSTD_outBuffer_s struct">ZSTD_outBuffer_s</a></div><div class="item-right docblock-short"></div></div></div><h2 id="enums" class="small-section-header"><a href="#enums">Enums</a></h2>
|
||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.ZSTD_EndDirective.html" title="zstd_sys::ZSTD_EndDirective enum">ZSTD_EndDirective</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.ZSTD_ResetDirective.html" title="zstd_sys::ZSTD_ResetDirective enum">ZSTD_ResetDirective</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.ZSTD_cParameter.html" title="zstd_sys::ZSTD_cParameter enum">ZSTD_cParameter</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.ZSTD_dParameter.html" title="zstd_sys::ZSTD_dParameter enum">ZSTD_dParameter</a></div><div class="item-right docblock-short"><p>Advanced decompression API (Requires v1.4.0+)</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.ZSTD_strategy.html" title="zstd_sys::ZSTD_strategy enum">ZSTD_strategy</a></div><div class="item-right docblock-short"><p>Advanced compression API (Requires v1.4.0+)</p>
|
||
</div></div></div><h2 id="constants" class="small-section-header"><a href="#constants">Constants</a></h2>
|
||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.AIO_PRIO_DELTA_MAX.html" title="zstd_sys::AIO_PRIO_DELTA_MAX constant">AIO_PRIO_DELTA_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.ARG_MAX.html" title="zstd_sys::ARG_MAX constant">ARG_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.BC_BASE_MAX.html" title="zstd_sys::BC_BASE_MAX constant">BC_BASE_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.BC_DIM_MAX.html" title="zstd_sys::BC_DIM_MAX constant">BC_DIM_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.BC_SCALE_MAX.html" title="zstd_sys::BC_SCALE_MAX constant">BC_SCALE_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.BC_STRING_MAX.html" title="zstd_sys::BC_STRING_MAX constant">BC_STRING_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.CHARCLASS_NAME_MAX.html" title="zstd_sys::CHARCLASS_NAME_MAX constant">CHARCLASS_NAME_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.COLL_WEIGHTS_MAX.html" title="zstd_sys::COLL_WEIGHTS_MAX constant">COLL_WEIGHTS_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.DELAYTIMER_MAX.html" title="zstd_sys::DELAYTIMER_MAX constant">DELAYTIMER_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.EXPR_NEST_MAX.html" title="zstd_sys::EXPR_NEST_MAX constant">EXPR_NEST_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.HOST_NAME_MAX.html" title="zstd_sys::HOST_NAME_MAX constant">HOST_NAME_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.LINE_MAX.html" title="zstd_sys::LINE_MAX constant">LINE_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.LINK_MAX.html" title="zstd_sys::LINK_MAX constant">LINK_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.LOGIN_NAME_MAX.html" title="zstd_sys::LOGIN_NAME_MAX constant">LOGIN_NAME_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.MAX_CANON.html" title="zstd_sys::MAX_CANON constant">MAX_CANON</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.MAX_INPUT.html" title="zstd_sys::MAX_INPUT constant">MAX_INPUT</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.MB_LEN_MAX.html" title="zstd_sys::MB_LEN_MAX constant">MB_LEN_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.MQ_PRIO_MAX.html" title="zstd_sys::MQ_PRIO_MAX constant">MQ_PRIO_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.NAME_MAX.html" title="zstd_sys::NAME_MAX constant">NAME_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.NGROUPS_MAX.html" title="zstd_sys::NGROUPS_MAX constant">NGROUPS_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.NR_OPEN.html" title="zstd_sys::NR_OPEN constant">NR_OPEN</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.PATH_MAX.html" title="zstd_sys::PATH_MAX constant">PATH_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.PIPE_BUF.html" title="zstd_sys::PIPE_BUF constant">PIPE_BUF</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.PTHREAD_DESTRUCTOR_ITERATIONS.html" title="zstd_sys::PTHREAD_DESTRUCTOR_ITERATIONS constant">PTHREAD_DESTRUCTOR_ITERATIONS</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.PTHREAD_KEYS_MAX.html" title="zstd_sys::PTHREAD_KEYS_MAX constant">PTHREAD_KEYS_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.PTHREAD_STACK_MIN.html" title="zstd_sys::PTHREAD_STACK_MIN constant">PTHREAD_STACK_MIN</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.RE_DUP_MAX.html" title="zstd_sys::RE_DUP_MAX constant">RE_DUP_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.RTSIG_MAX.html" title="zstd_sys::RTSIG_MAX constant">RTSIG_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.SEM_VALUE_MAX.html" title="zstd_sys::SEM_VALUE_MAX constant">SEM_VALUE_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.TTY_NAME_MAX.html" title="zstd_sys::TTY_NAME_MAX constant">TTY_NAME_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.XATTR_LIST_MAX.html" title="zstd_sys::XATTR_LIST_MAX constant">XATTR_LIST_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.XATTR_NAME_MAX.html" title="zstd_sys::XATTR_NAME_MAX constant">XATTR_NAME_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.XATTR_SIZE_MAX.html" title="zstd_sys::XATTR_SIZE_MAX constant">XATTR_SIZE_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.ZSTD_BLOCKSIZELOG_MAX.html" title="zstd_sys::ZSTD_BLOCKSIZELOG_MAX constant">ZSTD_BLOCKSIZELOG_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.ZSTD_BLOCKSIZE_MAX.html" title="zstd_sys::ZSTD_BLOCKSIZE_MAX constant">ZSTD_BLOCKSIZE_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.ZSTD_CLEVEL_DEFAULT.html" title="zstd_sys::ZSTD_CLEVEL_DEFAULT constant">ZSTD_CLEVEL_DEFAULT</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.ZSTD_CONTENTSIZE_ERROR.html" title="zstd_sys::ZSTD_CONTENTSIZE_ERROR constant">ZSTD_CONTENTSIZE_ERROR</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.ZSTD_CONTENTSIZE_UNKNOWN.html" title="zstd_sys::ZSTD_CONTENTSIZE_UNKNOWN constant">ZSTD_CONTENTSIZE_UNKNOWN</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.ZSTD_MAGICNUMBER.html" title="zstd_sys::ZSTD_MAGICNUMBER constant">ZSTD_MAGICNUMBER</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.ZSTD_MAGIC_DICTIONARY.html" title="zstd_sys::ZSTD_MAGIC_DICTIONARY constant">ZSTD_MAGIC_DICTIONARY</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.ZSTD_MAGIC_SKIPPABLE_MASK.html" title="zstd_sys::ZSTD_MAGIC_SKIPPABLE_MASK constant">ZSTD_MAGIC_SKIPPABLE_MASK</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.ZSTD_MAGIC_SKIPPABLE_START.html" title="zstd_sys::ZSTD_MAGIC_SKIPPABLE_START constant">ZSTD_MAGIC_SKIPPABLE_START</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.ZSTD_VERSION_MAJOR.html" title="zstd_sys::ZSTD_VERSION_MAJOR constant">ZSTD_VERSION_MAJOR</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.ZSTD_VERSION_MINOR.html" title="zstd_sys::ZSTD_VERSION_MINOR constant">ZSTD_VERSION_MINOR</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.ZSTD_VERSION_NUMBER.html" title="zstd_sys::ZSTD_VERSION_NUMBER constant">ZSTD_VERSION_NUMBER</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.ZSTD_VERSION_RELEASE.html" title="zstd_sys::ZSTD_VERSION_RELEASE constant">ZSTD_VERSION_RELEASE</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._ATFILE_SOURCE.html" title="zstd_sys::_ATFILE_SOURCE constant">_ATFILE_SOURCE</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._BITS_POSIX1_LIM_H.html" title="zstd_sys::_BITS_POSIX1_LIM_H constant">_BITS_POSIX1_LIM_H</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._BITS_POSIX2_LIM_H.html" title="zstd_sys::_BITS_POSIX2_LIM_H constant">_BITS_POSIX2_LIM_H</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._DEFAULT_SOURCE.html" title="zstd_sys::_DEFAULT_SOURCE constant">_DEFAULT_SOURCE</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._FEATURES_H.html" title="zstd_sys::_FEATURES_H constant">_FEATURES_H</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._LIBC_LIMITS_H_.html" title="zstd_sys::_LIBC_LIMITS_H_ constant">_LIBC_LIMITS_H_</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._POSIX2_BC_BASE_MAX.html" title="zstd_sys::_POSIX2_BC_BASE_MAX constant">_POSIX2_BC_BASE_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._POSIX2_BC_DIM_MAX.html" title="zstd_sys::_POSIX2_BC_DIM_MAX constant">_POSIX2_BC_DIM_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._POSIX2_BC_SCALE_MAX.html" title="zstd_sys::_POSIX2_BC_SCALE_MAX constant">_POSIX2_BC_SCALE_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._POSIX2_BC_STRING_MAX.html" title="zstd_sys::_POSIX2_BC_STRING_MAX constant">_POSIX2_BC_STRING_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._POSIX2_CHARCLASS_NAME_MAX.html" title="zstd_sys::_POSIX2_CHARCLASS_NAME_MAX constant">_POSIX2_CHARCLASS_NAME_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._POSIX2_COLL_WEIGHTS_MAX.html" title="zstd_sys::_POSIX2_COLL_WEIGHTS_MAX constant">_POSIX2_COLL_WEIGHTS_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._POSIX2_EXPR_NEST_MAX.html" title="zstd_sys::_POSIX2_EXPR_NEST_MAX constant">_POSIX2_EXPR_NEST_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._POSIX2_LINE_MAX.html" title="zstd_sys::_POSIX2_LINE_MAX constant">_POSIX2_LINE_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._POSIX2_RE_DUP_MAX.html" title="zstd_sys::_POSIX2_RE_DUP_MAX constant">_POSIX2_RE_DUP_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._POSIX_AIO_LISTIO_MAX.html" title="zstd_sys::_POSIX_AIO_LISTIO_MAX constant">_POSIX_AIO_LISTIO_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._POSIX_AIO_MAX.html" title="zstd_sys::_POSIX_AIO_MAX constant">_POSIX_AIO_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._POSIX_ARG_MAX.html" title="zstd_sys::_POSIX_ARG_MAX constant">_POSIX_ARG_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._POSIX_CHILD_MAX.html" title="zstd_sys::_POSIX_CHILD_MAX constant">_POSIX_CHILD_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._POSIX_CLOCKRES_MIN.html" title="zstd_sys::_POSIX_CLOCKRES_MIN constant">_POSIX_CLOCKRES_MIN</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._POSIX_C_SOURCE.html" title="zstd_sys::_POSIX_C_SOURCE constant">_POSIX_C_SOURCE</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._POSIX_DELAYTIMER_MAX.html" title="zstd_sys::_POSIX_DELAYTIMER_MAX constant">_POSIX_DELAYTIMER_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._POSIX_HOST_NAME_MAX.html" title="zstd_sys::_POSIX_HOST_NAME_MAX constant">_POSIX_HOST_NAME_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._POSIX_LINK_MAX.html" title="zstd_sys::_POSIX_LINK_MAX constant">_POSIX_LINK_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._POSIX_LOGIN_NAME_MAX.html" title="zstd_sys::_POSIX_LOGIN_NAME_MAX constant">_POSIX_LOGIN_NAME_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._POSIX_MAX_CANON.html" title="zstd_sys::_POSIX_MAX_CANON constant">_POSIX_MAX_CANON</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._POSIX_MAX_INPUT.html" title="zstd_sys::_POSIX_MAX_INPUT constant">_POSIX_MAX_INPUT</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._POSIX_MQ_OPEN_MAX.html" title="zstd_sys::_POSIX_MQ_OPEN_MAX constant">_POSIX_MQ_OPEN_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._POSIX_MQ_PRIO_MAX.html" title="zstd_sys::_POSIX_MQ_PRIO_MAX constant">_POSIX_MQ_PRIO_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._POSIX_NAME_MAX.html" title="zstd_sys::_POSIX_NAME_MAX constant">_POSIX_NAME_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._POSIX_NGROUPS_MAX.html" title="zstd_sys::_POSIX_NGROUPS_MAX constant">_POSIX_NGROUPS_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._POSIX_OPEN_MAX.html" title="zstd_sys::_POSIX_OPEN_MAX constant">_POSIX_OPEN_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._POSIX_PATH_MAX.html" title="zstd_sys::_POSIX_PATH_MAX constant">_POSIX_PATH_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._POSIX_PIPE_BUF.html" title="zstd_sys::_POSIX_PIPE_BUF constant">_POSIX_PIPE_BUF</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._POSIX_RE_DUP_MAX.html" title="zstd_sys::_POSIX_RE_DUP_MAX constant">_POSIX_RE_DUP_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._POSIX_RTSIG_MAX.html" title="zstd_sys::_POSIX_RTSIG_MAX constant">_POSIX_RTSIG_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._POSIX_SEM_NSEMS_MAX.html" title="zstd_sys::_POSIX_SEM_NSEMS_MAX constant">_POSIX_SEM_NSEMS_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._POSIX_SEM_VALUE_MAX.html" title="zstd_sys::_POSIX_SEM_VALUE_MAX constant">_POSIX_SEM_VALUE_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._POSIX_SIGQUEUE_MAX.html" title="zstd_sys::_POSIX_SIGQUEUE_MAX constant">_POSIX_SIGQUEUE_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._POSIX_SOURCE.html" title="zstd_sys::_POSIX_SOURCE constant">_POSIX_SOURCE</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._POSIX_SSIZE_MAX.html" title="zstd_sys::_POSIX_SSIZE_MAX constant">_POSIX_SSIZE_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._POSIX_STREAM_MAX.html" title="zstd_sys::_POSIX_STREAM_MAX constant">_POSIX_STREAM_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._POSIX_SYMLINK_MAX.html" title="zstd_sys::_POSIX_SYMLINK_MAX constant">_POSIX_SYMLINK_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._POSIX_SYMLOOP_MAX.html" title="zstd_sys::_POSIX_SYMLOOP_MAX constant">_POSIX_SYMLOOP_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._POSIX_THREAD_DESTRUCTOR_ITERATIONS.html" title="zstd_sys::_POSIX_THREAD_DESTRUCTOR_ITERATIONS constant">_POSIX_THREAD_DESTRUCTOR_ITERATIONS</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._POSIX_THREAD_KEYS_MAX.html" title="zstd_sys::_POSIX_THREAD_KEYS_MAX constant">_POSIX_THREAD_KEYS_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._POSIX_THREAD_THREADS_MAX.html" title="zstd_sys::_POSIX_THREAD_THREADS_MAX constant">_POSIX_THREAD_THREADS_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._POSIX_TIMER_MAX.html" title="zstd_sys::_POSIX_TIMER_MAX constant">_POSIX_TIMER_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._POSIX_TTY_NAME_MAX.html" title="zstd_sys::_POSIX_TTY_NAME_MAX constant">_POSIX_TTY_NAME_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._POSIX_TZNAME_MAX.html" title="zstd_sys::_POSIX_TZNAME_MAX constant">_POSIX_TZNAME_MAX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._STDC_PREDEF_H.html" title="zstd_sys::_STDC_PREDEF_H constant">_STDC_PREDEF_H</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant._SYS_CDEFS_H.html" title="zstd_sys::_SYS_CDEFS_H constant">_SYS_CDEFS_H</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.__GLIBC_MINOR__.html" title="zstd_sys::__GLIBC_MINOR__ constant">__GLIBC_MINOR__</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.__GLIBC_USE_DEPRECATED_GETS.html" title="zstd_sys::__GLIBC_USE_DEPRECATED_GETS constant">__GLIBC_USE_DEPRECATED_GETS</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.__GLIBC_USE_DEPRECATED_SCANF.html" title="zstd_sys::__GLIBC_USE_DEPRECATED_SCANF constant">__GLIBC_USE_DEPRECATED_SCANF</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.__GLIBC_USE_IEC_60559_BFP_EXT.html" title="zstd_sys::__GLIBC_USE_IEC_60559_BFP_EXT constant">__GLIBC_USE_IEC_60559_BFP_EXT</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.__GLIBC_USE_IEC_60559_BFP_EXT_C2X.html" title="zstd_sys::__GLIBC_USE_IEC_60559_BFP_EXT_C2X constant">__GLIBC_USE_IEC_60559_BFP_EXT_C2X</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.__GLIBC_USE_IEC_60559_FUNCS_EXT.html" title="zstd_sys::__GLIBC_USE_IEC_60559_FUNCS_EXT constant">__GLIBC_USE_IEC_60559_FUNCS_EXT</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.__GLIBC_USE_IEC_60559_FUNCS_EXT_C2X.html" title="zstd_sys::__GLIBC_USE_IEC_60559_FUNCS_EXT_C2X constant">__GLIBC_USE_IEC_60559_FUNCS_EXT_C2X</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.__GLIBC_USE_IEC_60559_TYPES_EXT.html" title="zstd_sys::__GLIBC_USE_IEC_60559_TYPES_EXT constant">__GLIBC_USE_IEC_60559_TYPES_EXT</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.__GLIBC_USE_ISOC2X.html" title="zstd_sys::__GLIBC_USE_ISOC2X constant">__GLIBC_USE_ISOC2X</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.__GLIBC_USE_LIB_EXT2.html" title="zstd_sys::__GLIBC_USE_LIB_EXT2 constant">__GLIBC_USE_LIB_EXT2</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.__GLIBC__.html" title="zstd_sys::__GLIBC__ constant">__GLIBC__</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.__GNU_LIBRARY__.html" title="zstd_sys::__GNU_LIBRARY__ constant">__GNU_LIBRARY__</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.__HAVE_GENERIC_SELECTION.html" title="zstd_sys::__HAVE_GENERIC_SELECTION constant">__HAVE_GENERIC_SELECTION</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.__LDOUBLE_REDIRECTS_TO_FLOAT128_ABI.html" title="zstd_sys::__LDOUBLE_REDIRECTS_TO_FLOAT128_ABI constant">__LDOUBLE_REDIRECTS_TO_FLOAT128_ABI</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.__STDC_IEC_559_COMPLEX__.html" title="zstd_sys::__STDC_IEC_559_COMPLEX__ constant">__STDC_IEC_559_COMPLEX__</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.__STDC_IEC_559__.html" title="zstd_sys::__STDC_IEC_559__ constant">__STDC_IEC_559__</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.__STDC_ISO_10646__.html" title="zstd_sys::__STDC_ISO_10646__ constant">__STDC_ISO_10646__</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.__SYSCALL_WORDSIZE.html" title="zstd_sys::__SYSCALL_WORDSIZE constant">__SYSCALL_WORDSIZE</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.__USE_ATFILE.html" title="zstd_sys::__USE_ATFILE constant">__USE_ATFILE</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.__USE_FORTIFY_LEVEL.html" title="zstd_sys::__USE_FORTIFY_LEVEL constant">__USE_FORTIFY_LEVEL</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.__USE_ISOC11.html" title="zstd_sys::__USE_ISOC11 constant">__USE_ISOC11</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.__USE_ISOC95.html" title="zstd_sys::__USE_ISOC95 constant">__USE_ISOC95</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.__USE_ISOC99.html" title="zstd_sys::__USE_ISOC99 constant">__USE_ISOC99</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.__USE_MISC.html" title="zstd_sys::__USE_MISC constant">__USE_MISC</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.__USE_POSIX.html" title="zstd_sys::__USE_POSIX constant">__USE_POSIX</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.__USE_POSIX2.html" title="zstd_sys::__USE_POSIX2 constant">__USE_POSIX2</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.__USE_POSIX199309.html" title="zstd_sys::__USE_POSIX199309 constant">__USE_POSIX199309</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.__USE_POSIX199506.html" title="zstd_sys::__USE_POSIX199506 constant">__USE_POSIX199506</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.__USE_POSIX_IMPLICITLY.html" title="zstd_sys::__USE_POSIX_IMPLICITLY constant">__USE_POSIX_IMPLICITLY</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.__USE_XOPEN2K.html" title="zstd_sys::__USE_XOPEN2K constant">__USE_XOPEN2K</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.__USE_XOPEN2K8.html" title="zstd_sys::__USE_XOPEN2K8 constant">__USE_XOPEN2K8</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.__WORDSIZE.html" title="zstd_sys::__WORDSIZE constant">__WORDSIZE</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.__WORDSIZE_TIME64_COMPAT32.html" title="zstd_sys::__WORDSIZE_TIME64_COMPAT32 constant">__WORDSIZE_TIME64_COMPAT32</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.__glibc_c99_flexarr_available.html" title="zstd_sys::__glibc_c99_flexarr_available constant">__glibc_c99_flexarr_available</a></div><div class="item-right docblock-short"></div></div></div><h2 id="functions" class="small-section-header"><a href="#functions">Functions</a></h2>
|
||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZDICT_finalizeDictionary.html" title="zstd_sys::ZDICT_finalizeDictionary fn">ZDICT_finalizeDictionary</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"><p>ZDICT_finalizeDictionary():
|
||
Given a custom content as a basis for dictionary, and a set of samples,
|
||
finalize dictionary by adding headers and statistics according to the zstd
|
||
dictionary format.</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZDICT_getDictHeaderSize.html" title="zstd_sys::ZDICT_getDictHeaderSize fn">ZDICT_getDictHeaderSize</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZDICT_getDictID.html" title="zstd_sys::ZDICT_getDictID fn">ZDICT_getDictID</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZDICT_getErrorName.html" title="zstd_sys::ZDICT_getErrorName fn">ZDICT_getErrorName</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZDICT_isError.html" title="zstd_sys::ZDICT_isError fn">ZDICT_isError</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZDICT_trainFromBuffer.html" title="zstd_sys::ZDICT_trainFromBuffer fn">ZDICT_trainFromBuffer</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"><p>ZDICT_trainFromBuffer():
|
||
Train a dictionary from an array of samples.
|
||
Redirect towards ZDICT_optimizeTrainFromBuffer_fastCover() single-threaded, with d=8, steps=4,
|
||
f=20, and accel=1.
|
||
Samples must be stored concatenated in a single flat buffer <code>samplesBuffer</code>,
|
||
supplied with an array of sizes <code>samplesSizes</code>, providing the size of each sample, in order.
|
||
The resulting dictionary will be saved into <code>dictBuffer</code>.
|
||
@return: size of dictionary stored into <code>dictBuffer</code> (<= <code>dictBufferCapacity</code>)
|
||
or an error code, which can be tested with ZDICT_isError().
|
||
Note: Dictionary training will fail if there are not enough samples to construct a
|
||
dictionary, or if most of the samples are too small (< 8 bytes being the lower limit).
|
||
If dictionary training fails, you should use zstd without a dictionary, as the dictionary
|
||
would’ve been ineffective anyways. If you believe your samples would benefit from a dictionary
|
||
please open an issue with details, and we can look into it.
|
||
Note: ZDICT_trainFromBuffer()’s memory usage is about 6 MB.
|
||
Tips: In general, a reasonable dictionary has a size of ~ 100 KB.
|
||
It’s possible to select smaller or larger size, just by specifying <code>dictBufferCapacity</code>.
|
||
In general, it’s recommended to provide a few thousands samples, though this can vary a lot.
|
||
It’s recommended that total size of all samples be about ~x100 times the target size of dictionary.</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_CCtx_loadDictionary.html" title="zstd_sys::ZSTD_CCtx_loadDictionary fn">ZSTD_CCtx_loadDictionary</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"><p>ZSTD_CCtx_loadDictionary() : Requires v1.4.0+
|
||
Create an internal CDict from <code>dict</code> buffer.
|
||
Decompression will have to use same dictionary.
|
||
@result : 0, or an error code (which can be tested with ZSTD_isError()).
|
||
Special: Loading a NULL (or 0-size) dictionary invalidates previous dictionary,
|
||
meaning “return to no-dictionary mode”.
|
||
Note 1 : Dictionary is sticky, it will be used for all future compressed frames.
|
||
To return to “no-dictionary” situation, load a NULL dictionary (or reset parameters).
|
||
Note 2 : Loading a dictionary involves building tables.
|
||
It’s also a CPU consuming operation, with non-negligible impact on latency.
|
||
Tables are dependent on compression parameters, and for this reason,
|
||
compression parameters can no longer be changed after loading a dictionary.
|
||
Note 3 :<code>dict</code> content will be copied internally.
|
||
Use experimental ZSTD_CCtx_loadDictionary_byReference() to reference content instead.
|
||
In such a case, dictionary buffer must outlive its users.
|
||
Note 4 : Use ZSTD_CCtx_loadDictionary_advanced()
|
||
to precisely select how dictionary content must be interpreted.</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_CCtx_refCDict.html" title="zstd_sys::ZSTD_CCtx_refCDict fn">ZSTD_CCtx_refCDict</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"><p>ZSTD_CCtx_refCDict() : Requires v1.4.0+
|
||
Reference a prepared dictionary, to be used for all next compressed frames.
|
||
Note that compression parameters are enforced from within CDict,
|
||
and supersede any compression parameter previously set within CCtx.
|
||
The parameters ignored are labelled as “superseded-by-cdict” in the ZSTD_cParameter enum docs.
|
||
The ignored parameters will be used again if the CCtx is returned to no-dictionary mode.
|
||
The dictionary will remain valid for future compressed frames using same CCtx.
|
||
@result : 0, or an error code (which can be tested with ZSTD_isError()).
|
||
Special : Referencing a NULL CDict means “return to no-dictionary mode”.
|
||
Note 1 : Currently, only one dictionary can be managed.
|
||
Referencing a new dictionary effectively “discards” any previous one.
|
||
Note 2 : CDict is just referenced, its lifetime must outlive its usage within CCtx.</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_CCtx_refPrefix.html" title="zstd_sys::ZSTD_CCtx_refPrefix fn">ZSTD_CCtx_refPrefix</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"><p>ZSTD_CCtx_refPrefix() : Requires v1.4.0+
|
||
Reference a prefix (single-usage dictionary) for next compressed frame.
|
||
A prefix is <strong>only used once</strong>. Tables are discarded at end of frame (ZSTD_e_end).
|
||
Decompression will need same prefix to properly regenerate data.
|
||
Compressing with a prefix is similar in outcome as performing a diff and compressing it,
|
||
but performs much faster, especially during decompression (compression speed is tunable with compression level).
|
||
@result : 0, or an error code (which can be tested with ZSTD_isError()).
|
||
Special: Adding any prefix (including NULL) invalidates any previous prefix or dictionary
|
||
Note 1 : Prefix buffer is referenced. It <strong>must</strong> outlive compression.
|
||
Its content must remain unmodified during compression.
|
||
Note 2 : If the intention is to diff some large src data blob with some prior version of itself,
|
||
ensure that the window size is large enough to contain the entire source.
|
||
See ZSTD_c_windowLog.
|
||
Note 3 : Referencing a prefix involves building tables, which are dependent on compression parameters.
|
||
It’s a CPU consuming operation, with non-negligible impact on latency.
|
||
If there is a need to use the same prefix multiple times, consider loadDictionary instead.
|
||
Note 4 : By default, the prefix is interpreted as raw content (ZSTD_dct_rawContent).
|
||
Use experimental ZSTD_CCtx_refPrefix_advanced() to alter dictionary interpretation.</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_CCtx_reset.html" title="zstd_sys::ZSTD_CCtx_reset fn">ZSTD_CCtx_reset</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"><p>ZSTD_CCtx_reset() :
|
||
There are 2 different things that can be reset, independently or jointly :</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_CCtx_setParameter.html" title="zstd_sys::ZSTD_CCtx_setParameter fn">ZSTD_CCtx_setParameter</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"><p>ZSTD_CCtx_setParameter() :
|
||
Set one compression parameter, selected by enum ZSTD_cParameter.
|
||
All parameters have valid bounds. Bounds can be queried using ZSTD_cParam_getBounds().
|
||
Providing a value beyond bound will either clamp it, or trigger an error (depending on parameter).
|
||
Setting a parameter is generally only possible during frame initialization (before starting compression).
|
||
Exception : when using multi-threading mode (nbWorkers >= 1),
|
||
the following parameters can be updated <em>during</em> compression (within same frame):
|
||
=> compressionLevel, hashLog, chainLog, searchLog, minMatch, targetLength and strategy.
|
||
new parameters will be active for next job only (after a flush()).
|
||
@return : an error code (which can be tested using ZSTD_isError()).</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_CCtx_setPledgedSrcSize.html" title="zstd_sys::ZSTD_CCtx_setPledgedSrcSize fn">ZSTD_CCtx_setPledgedSrcSize</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"><p>ZSTD_CCtx_setPledgedSrcSize() :
|
||
Total input data size to be compressed as a single frame.
|
||
Value will be written in frame header, unless if explicitly forbidden using ZSTD_c_contentSizeFlag.
|
||
This value will also be controlled at end of frame, and trigger an error if not respected.
|
||
@result : 0, or an error code (which can be tested with ZSTD_isError()).
|
||
Note 1 : pledgedSrcSize==0 actually means zero, aka an empty frame.
|
||
In order to mean “unknown content size”, pass constant ZSTD_CONTENTSIZE_UNKNOWN.
|
||
ZSTD_CONTENTSIZE_UNKNOWN is default value for any new frame.
|
||
Note 2 : pledgedSrcSize is only valid once, for the next frame.
|
||
It’s discarded at the end of the frame, and replaced by ZSTD_CONTENTSIZE_UNKNOWN.
|
||
Note 3 : Whenever all input data is provided and consumed in a single round,
|
||
for example with ZSTD_compress2(),
|
||
or invoking immediately ZSTD_compressStream2(,,,ZSTD_e_end),
|
||
this value is automatically overridden by srcSize instead.</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_CStreamInSize.html" title="zstd_sys::ZSTD_CStreamInSize fn">ZSTD_CStreamInSize</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_CStreamOutSize.html" title="zstd_sys::ZSTD_CStreamOutSize fn">ZSTD_CStreamOutSize</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_DCtx_loadDictionary.html" title="zstd_sys::ZSTD_DCtx_loadDictionary fn">ZSTD_DCtx_loadDictionary</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"><p>ZSTD_DCtx_loadDictionary() : Requires v1.4.0+
|
||
Create an internal DDict from dict buffer,
|
||
to be used to decompress next frames.
|
||
The dictionary remains valid for all future frames, until explicitly invalidated.
|
||
@result : 0, or an error code (which can be tested with ZSTD_isError()).
|
||
Special : Adding a NULL (or 0-size) dictionary invalidates any previous dictionary,
|
||
meaning “return to no-dictionary mode”.
|
||
Note 1 : Loading a dictionary involves building tables,
|
||
which has a non-negligible impact on CPU usage and latency.
|
||
It’s recommended to “load once, use many times”, to amortize the cost
|
||
Note 2 :<code>dict</code> content will be copied internally, so <code>dict</code> can be released after loading.
|
||
Use ZSTD_DCtx_loadDictionary_byReference() to reference dictionary content instead.
|
||
Note 3 : Use ZSTD_DCtx_loadDictionary_advanced() to take control of
|
||
how dictionary content is loaded and interpreted.</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_DCtx_refDDict.html" title="zstd_sys::ZSTD_DCtx_refDDict fn">ZSTD_DCtx_refDDict</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"><p>ZSTD_DCtx_refDDict() : Requires v1.4.0+
|
||
Reference a prepared dictionary, to be used to decompress next frames.
|
||
The dictionary remains active for decompression of future frames using same DCtx.</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_DCtx_refPrefix.html" title="zstd_sys::ZSTD_DCtx_refPrefix fn">ZSTD_DCtx_refPrefix</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"><p>ZSTD_DCtx_refPrefix() : Requires v1.4.0+
|
||
Reference a prefix (single-usage dictionary) to decompress next frame.
|
||
This is the reverse operation of ZSTD_CCtx_refPrefix(),
|
||
and must use the same prefix as the one used during compression.
|
||
Prefix is <strong>only used once</strong>. Reference is discarded at end of frame.
|
||
End of frame is reached when ZSTD_decompressStream() returns 0.
|
||
@result : 0, or an error code (which can be tested with ZSTD_isError()).
|
||
Note 1 : Adding any prefix (including NULL) invalidates any previously set prefix or dictionary
|
||
Note 2 : Prefix buffer is referenced. It <strong>must</strong> outlive decompression.
|
||
Prefix buffer must remain unmodified up to the end of frame,
|
||
reached when ZSTD_decompressStream() returns 0.
|
||
Note 3 : By default, the prefix is treated as raw content (ZSTD_dct_rawContent).
|
||
Use ZSTD_CCtx_refPrefix_advanced() to alter dictMode (Experimental section)
|
||
Note 4 : Referencing a raw content prefix has almost no cpu nor memory cost.
|
||
A full dictionary is more costly, as it requires building tables.</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_DCtx_reset.html" title="zstd_sys::ZSTD_DCtx_reset fn">ZSTD_DCtx_reset</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"><p>ZSTD_DCtx_reset() :
|
||
Return a DCtx to clean state.
|
||
Session and parameters can be reset jointly or separately.
|
||
Parameters can only be reset when no active frame is being decompressed.
|
||
@return : 0, or an error code, which can be tested with ZSTD_isError()</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_DCtx_setParameter.html" title="zstd_sys::ZSTD_DCtx_setParameter fn">ZSTD_DCtx_setParameter</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"><p>ZSTD_DCtx_setParameter() :
|
||
Set one compression parameter, selected by enum ZSTD_dParameter.
|
||
All parameters have valid bounds. Bounds can be queried using ZSTD_dParam_getBounds().
|
||
Providing a value beyond bound will either clamp it, or trigger an error (depending on parameter).
|
||
Setting a parameter is only possible during frame initialization (before starting decompression).
|
||
@return : 0, or an error code (which can be tested using ZSTD_isError()).</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_DStreamInSize.html" title="zstd_sys::ZSTD_DStreamInSize fn">ZSTD_DStreamInSize</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_DStreamOutSize.html" title="zstd_sys::ZSTD_DStreamOutSize fn">ZSTD_DStreamOutSize</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_cParam_getBounds.html" title="zstd_sys::ZSTD_cParam_getBounds fn">ZSTD_cParam_getBounds</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"><p>ZSTD_cParam_getBounds() :
|
||
All parameters must belong to an interval with lower and upper bounds,
|
||
otherwise they will either trigger an error or be automatically clamped.
|
||
@return : a structure, ZSTD_bounds, which contains
|
||
- an error status field, which must be tested using ZSTD_isError()
|
||
- lower and upper bounds, both inclusive</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_compress.html" title="zstd_sys::ZSTD_compress fn">ZSTD_compress</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"><p>Simple API
|
||
Compresses <code>src</code> content as a single zstd compressed frame into already allocated <code>dst</code>.
|
||
Hint : compression runs faster if <code>dstCapacity</code> >= <code>ZSTD_compressBound(srcSize)</code>.
|
||
@return : compressed size written into <code>dst</code> (<= `dstCapacity),
|
||
or an error code if it fails (which can be tested using ZSTD_isError()).</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_compress2.html" title="zstd_sys::ZSTD_compress2 fn">ZSTD_compress2</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"><p>ZSTD_compress2() :
|
||
Behave the same as ZSTD_compressCCtx(), but compression parameters are set using the advanced API.
|
||
ZSTD_compress2() always starts a new frame.
|
||
Should cctx hold data from a previously unfinished frame, everything about it is forgotten.</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_compressBound.html" title="zstd_sys::ZSTD_compressBound fn">ZSTD_compressBound</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_compressCCtx.html" title="zstd_sys::ZSTD_compressCCtx fn">ZSTD_compressCCtx</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"><p>ZSTD_compressCCtx() :
|
||
Same as ZSTD_compress(), using an explicit ZSTD_CCtx.
|
||
Important : in order to behave similarly to <code>ZSTD_compress()</code>,
|
||
this function compresses at requested compression level,
|
||
<strong>ignoring any other parameter</strong> .
|
||
If any advanced parameter was set using the advanced API,
|
||
they will all be reset. Only <code>compressionLevel</code> remains.</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_compressStream.html" title="zstd_sys::ZSTD_compressStream fn">ZSTD_compressStream</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"><p>Alternative for ZSTD_compressStream2(zcs, output, input, ZSTD_e_continue).
|
||
NOTE: The return value is different. ZSTD_compressStream() returns a hint for
|
||
the next read size (if non-zero and not an error). ZSTD_compressStream2()
|
||
returns the minimum nb of bytes left to flush (if non-zero and not an error).</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_compressStream2.html" title="zstd_sys::ZSTD_compressStream2 fn">ZSTD_compressStream2</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"><p>ZSTD_compressStream2() : Requires v1.4.0+
|
||
Behaves about the same as ZSTD_compressStream, with additional control on end directive.</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_compress_usingCDict.html" title="zstd_sys::ZSTD_compress_usingCDict fn">ZSTD_compress_usingCDict</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"><p>ZSTD_compress_usingCDict() :
|
||
Compression using a digested Dictionary.
|
||
Recommended when same dictionary is used multiple times.
|
||
Note : compression level is <em>decided at dictionary creation time</em>,
|
||
and frame parameters are hardcoded (dictID=yes, contentSize=yes, checksum=no)</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_compress_usingDict.html" title="zstd_sys::ZSTD_compress_usingDict fn">ZSTD_compress_usingDict</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"><p>Simple dictionary API
|
||
Compression at an explicit compression level using a Dictionary.
|
||
A dictionary can be any arbitrary data segment (also called a prefix),
|
||
or a buffer with specified information (see zdict.h).
|
||
Note : This function loads the dictionary, resulting in significant startup delay.
|
||
It’s intended for a dictionary used only once.
|
||
Note 2 : When <code>dict == NULL || dictSize < 8</code> no dictionary is used.</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_createCCtx.html" title="zstd_sys::ZSTD_createCCtx fn">ZSTD_createCCtx</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_createCDict.html" title="zstd_sys::ZSTD_createCDict fn">ZSTD_createCDict</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"><p>ZSTD_createCDict() :
|
||
When compressing multiple messages or blocks using the same dictionary,
|
||
it’s recommended to digest the dictionary only once, since it’s a costly operation.
|
||
ZSTD_createCDict() will create a state from digesting a dictionary.
|
||
The resulting state can be used for future compression operations with very limited startup cost.
|
||
ZSTD_CDict can be created once and shared by multiple threads concurrently, since its usage is read-only.
|
||
@dictBuffer can be released after ZSTD_CDict creation, because its content is copied within CDict.
|
||
Note 1 : Consider experimental function <code>ZSTD_createCDict_byReference()</code> if you prefer to not duplicate @dictBuffer content.
|
||
Note 2 : A ZSTD_CDict can be created from an empty @dictBuffer,
|
||
in which case the only thing that it transports is the @compressionLevel.
|
||
This can be useful in a pipeline featuring ZSTD_compress_usingCDict() exclusively,
|
||
expecting a ZSTD_CDict parameter with any data, including those without a known dictionary.</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_createCStream.html" title="zstd_sys::ZSTD_createCStream fn">ZSTD_createCStream</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_createDCtx.html" title="zstd_sys::ZSTD_createDCtx fn">ZSTD_createDCtx</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_createDDict.html" title="zstd_sys::ZSTD_createDDict fn">ZSTD_createDDict</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"><p>ZSTD_createDDict() :
|
||
Create a digested dictionary, ready to start decompression operation without startup delay.
|
||
dictBuffer can be released after DDict creation, as its content is copied inside DDict.</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_createDStream.html" title="zstd_sys::ZSTD_createDStream fn">ZSTD_createDStream</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_dParam_getBounds.html" title="zstd_sys::ZSTD_dParam_getBounds fn">ZSTD_dParam_getBounds</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"><p>ZSTD_dParam_getBounds() :
|
||
All parameters must belong to an interval with lower and upper bounds,
|
||
otherwise they will either trigger an error or be automatically clamped.
|
||
@return : a structure, ZSTD_bounds, which contains
|
||
- an error status field, which must be tested using ZSTD_isError()
|
||
- both lower and upper bounds, inclusive</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_decompress.html" title="zstd_sys::ZSTD_decompress fn">ZSTD_decompress</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"><p>ZSTD_decompress() :
|
||
<code>compressedSize</code> : must be the <em>exact</em> size of some number of compressed and/or skippable frames.
|
||
<code>dstCapacity</code> is an upper bound of originalSize to regenerate.
|
||
If user cannot imply a maximum upper bound, it’s better to use streaming mode to decompress data.
|
||
@return : the number of bytes decompressed into <code>dst</code> (<= <code>dstCapacity</code>),
|
||
or an errorCode if it fails (which can be tested using ZSTD_isError()).</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_decompressDCtx.html" title="zstd_sys::ZSTD_decompressDCtx fn">ZSTD_decompressDCtx</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"><p>ZSTD_decompressDCtx() :
|
||
Same as ZSTD_decompress(),
|
||
requires an allocated ZSTD_DCtx.
|
||
Compatible with sticky parameters.</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_decompressStream.html" title="zstd_sys::ZSTD_decompressStream fn">ZSTD_decompressStream</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_decompress_usingDDict.html" title="zstd_sys::ZSTD_decompress_usingDDict fn">ZSTD_decompress_usingDDict</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"><p>ZSTD_decompress_usingDDict() :
|
||
Decompression using a digested Dictionary.
|
||
Recommended when same dictionary is used multiple times.</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_decompress_usingDict.html" title="zstd_sys::ZSTD_decompress_usingDict fn">ZSTD_decompress_usingDict</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"><p>ZSTD_decompress_usingDict() :
|
||
Decompression using a known Dictionary.
|
||
Dictionary must be identical to the one used during compression.
|
||
Note : This function loads the dictionary, resulting in significant startup delay.
|
||
It’s intended for a dictionary used only once.
|
||
Note : When <code>dict == NULL || dictSize < 8</code> no dictionary is used.</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_defaultCLevel.html" title="zstd_sys::ZSTD_defaultCLevel fn">ZSTD_defaultCLevel</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_endStream.html" title="zstd_sys::ZSTD_endStream fn">ZSTD_endStream</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"><p>Equivalent to ZSTD_compressStream2(zcs, output, &emptyInput, ZSTD_e_end).</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_findFrameCompressedSize.html" title="zstd_sys::ZSTD_findFrameCompressedSize fn">ZSTD_findFrameCompressedSize</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"><p>ZSTD_findFrameCompressedSize() : Requires v1.4.0+
|
||
<code>src</code> should point to the start of a ZSTD frame or skippable frame.
|
||
<code>srcSize</code> must be >= first frame size
|
||
@return : the compressed size of the first frame starting at <code>src</code>,
|
||
suitable to pass as <code>srcSize</code> to <code>ZSTD_decompress</code> or similar,
|
||
or an error code if input is invalid</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_flushStream.html" title="zstd_sys::ZSTD_flushStream fn">ZSTD_flushStream</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"><p>Equivalent to ZSTD_compressStream2(zcs, output, &emptyInput, ZSTD_e_flush).</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_freeCCtx.html" title="zstd_sys::ZSTD_freeCCtx fn">ZSTD_freeCCtx</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_freeCDict.html" title="zstd_sys::ZSTD_freeCDict fn">ZSTD_freeCDict</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"><p>ZSTD_freeCDict() :
|
||
Function frees memory allocated by ZSTD_createCDict().
|
||
If a NULL pointer is passed, no operation is performed.</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_freeCStream.html" title="zstd_sys::ZSTD_freeCStream fn">ZSTD_freeCStream</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_freeDCtx.html" title="zstd_sys::ZSTD_freeDCtx fn">ZSTD_freeDCtx</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_freeDDict.html" title="zstd_sys::ZSTD_freeDDict fn">ZSTD_freeDDict</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"><p>ZSTD_freeDDict() :
|
||
Function frees memory allocated with ZSTD_createDDict()
|
||
If a NULL pointer is passed, no operation is performed.</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_freeDStream.html" title="zstd_sys::ZSTD_freeDStream fn">ZSTD_freeDStream</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_getDecompressedSize.html" title="zstd_sys::ZSTD_getDecompressedSize fn">ZSTD_getDecompressedSize</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"><p>ZSTD_getDecompressedSize() :
|
||
NOTE: This function is now obsolete, in favor of ZSTD_getFrameContentSize().
|
||
Both functions work the same way, but ZSTD_getDecompressedSize() blends
|
||
“empty”, “unknown” and “error” results to the same return value (0),
|
||
while ZSTD_getFrameContentSize() gives them separate return values.
|
||
@return : decompressed size of <code>src</code> frame content <em>if known and not empty</em>, 0 otherwise.</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_getDictID_fromCDict.html" title="zstd_sys::ZSTD_getDictID_fromCDict fn">ZSTD_getDictID_fromCDict</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"><p>ZSTD_getDictID_fromCDict() : Requires v1.5.0+
|
||
Provides the dictID of the dictionary loaded into <code>cdict</code>.
|
||
If @return == 0, the dictionary is not conformant to Zstandard specification, or empty.
|
||
Non-conformant dictionaries can still be loaded, but as content-only dictionaries.</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_getDictID_fromDDict.html" title="zstd_sys::ZSTD_getDictID_fromDDict fn">ZSTD_getDictID_fromDDict</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"><p>ZSTD_getDictID_fromDDict() : Requires v1.4.0+
|
||
Provides the dictID of the dictionary loaded into <code>ddict</code>.
|
||
If @return == 0, the dictionary is not conformant to Zstandard specification, or empty.
|
||
Non-conformant dictionaries can still be loaded, but as content-only dictionaries.</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_getDictID_fromDict.html" title="zstd_sys::ZSTD_getDictID_fromDict fn">ZSTD_getDictID_fromDict</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"><p>ZSTD_getDictID_fromDict() : Requires v1.4.0+
|
||
Provides the dictID stored within dictionary.
|
||
if @return == 0, the dictionary is not conformant with Zstandard specification.
|
||
It can still be loaded, but as a content-only dictionary.</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_getDictID_fromFrame.html" title="zstd_sys::ZSTD_getDictID_fromFrame fn">ZSTD_getDictID_fromFrame</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"><p>ZSTD_getDictID_fromFrame() : Requires v1.4.0+
|
||
Provides the dictID required to decompressed the frame stored within <code>src</code>.
|
||
If @return == 0, the dictID could not be decoded.
|
||
This could for one of the following reasons :</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_getErrorName.html" title="zstd_sys::ZSTD_getErrorName fn">ZSTD_getErrorName</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_getFrameContentSize.html" title="zstd_sys::ZSTD_getFrameContentSize fn">ZSTD_getFrameContentSize</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_initCStream.html" title="zstd_sys::ZSTD_initCStream fn">ZSTD_initCStream</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"><p>Equivalent to:</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_initDStream.html" title="zstd_sys::ZSTD_initDStream fn">ZSTD_initDStream</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_isError.html" title="zstd_sys::ZSTD_isError fn">ZSTD_isError</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_maxCLevel.html" title="zstd_sys::ZSTD_maxCLevel fn">ZSTD_maxCLevel</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_minCLevel.html" title="zstd_sys::ZSTD_minCLevel fn">ZSTD_minCLevel</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_sizeof_CCtx.html" title="zstd_sys::ZSTD_sizeof_CCtx fn">ZSTD_sizeof_CCtx</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"><p>ZSTD_sizeof_*() : Requires v1.4.0+
|
||
These functions give the <em>current</em> memory usage of selected object.
|
||
Note that object memory usage can evolve (increase or decrease) over time.</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_sizeof_CDict.html" title="zstd_sys::ZSTD_sizeof_CDict fn">ZSTD_sizeof_CDict</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_sizeof_CStream.html" title="zstd_sys::ZSTD_sizeof_CStream fn">ZSTD_sizeof_CStream</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_sizeof_DCtx.html" title="zstd_sys::ZSTD_sizeof_DCtx fn">ZSTD_sizeof_DCtx</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_sizeof_DDict.html" title="zstd_sys::ZSTD_sizeof_DDict fn">ZSTD_sizeof_DDict</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_sizeof_DStream.html" title="zstd_sys::ZSTD_sizeof_DStream fn">ZSTD_sizeof_DStream</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_versionNumber.html" title="zstd_sys::ZSTD_versionNumber fn">ZSTD_versionNumber</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"><p>ZSTD_versionNumber() :
|
||
Return runtime library version, the value is (MAJOR<em>100</em>100 + MINOR*100 + RELEASE).</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.ZSTD_versionString.html" title="zstd_sys::ZSTD_versionString fn">ZSTD_versionString</a><a title="unsafe function" href="#"><sup>⚠</sup></a></div><div class="item-right docblock-short"><p>ZSTD_versionString() :
|
||
Return runtime library version, like “1.4.5”. Requires v1.3.0+.</p>
|
||
</div></div></div><h2 id="types" class="small-section-header"><a href="#types">Type Definitions</a></h2>
|
||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="type" href="type.ZSTD_CCtx.html" title="zstd_sys::ZSTD_CCtx type">ZSTD_CCtx</a></div><div class="item-right docblock-short"><p>Explicit context</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="type" href="type.ZSTD_CDict.html" title="zstd_sys::ZSTD_CDict type">ZSTD_CDict</a></div><div class="item-right docblock-short"><p>Bulk processing dictionary API</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="type" href="type.ZSTD_CStream.html" title="zstd_sys::ZSTD_CStream type">ZSTD_CStream</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="type" href="type.ZSTD_DCtx.html" title="zstd_sys::ZSTD_DCtx type">ZSTD_DCtx</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="type" href="type.ZSTD_DDict.html" title="zstd_sys::ZSTD_DDict type">ZSTD_DDict</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="type" href="type.ZSTD_DStream.html" title="zstd_sys::ZSTD_DStream type">ZSTD_DStream</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="type" href="type.ZSTD_inBuffer.html" title="zstd_sys::ZSTD_inBuffer type">ZSTD_inBuffer</a></div><div class="item-right docblock-short"><p>Streaming</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="type" href="type.ZSTD_outBuffer.html" title="zstd_sys::ZSTD_outBuffer type">ZSTD_outBuffer</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="type" href="type.wchar_t.html" title="zstd_sys::wchar_t type">wchar_t</a></div><div class="item-right docblock-short"></div></div></div></section><section id="search" class="content hidden"></section></div></main><div id="rustdoc-vars" data-root-path="../" data-current-crate="zstd_sys" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.59.0 (9d1b2106e 2022-02-23)" ></div>
|
||
</body></html> |