sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget/translations/zh_CN/staging/xzmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget/translations/zh_TW/staging/xzmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget/translations/it_IT/staging/xzmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget/translations/ja_JP/staging/xzmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget/translations/ko_KR/staging/xzmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget/translations/sp_SP/staging/xzmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(hSPDX-License-Identifier: 0BSDh]hSPDX-License-Identifier: 0BSD}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhh8/var/lib/git/docbuild/linux/Documentation/staging/xz.rsthKubhsection)}(hhh](htitle)}(hXZ data compression in Linuxh]hXZ data compression in Linux}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Introductionh]h Introduction}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hXXZ is a general purpose data compression format with high compression ratio. The XZ decompressor in Linux is called XZ Embedded. It supports the LZMA2 filter and optionally also Branch/Call/Jump (BCJ) filters for executable code. CRC32 is supported for integrity checking.h]hXXZ is a general purpose data compression format with high compression ratio. The XZ decompressor in Linux is called XZ Embedded. It supports the LZMA2 filter and optionally also Branch/Call/Jump (BCJ) filters for executable code. CRC32 is supported for integrity checking.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hSee the `XZ Embedded`_ home page for the latest version which includes a few optional extra features that aren't required in the Linux kernel and information about using the code outside the Linux kernel.h](hSee the }(hhhhhNhNubh reference)}(h`XZ Embedded`_h]h XZ Embedded}(hhhhhNhNubah}(h]h ]h"]h$]h&]name XZ Embeddedrefuri$https://tukaani.org/xz/embedded.htmluh1hhhresolvedKubh home page for the latest version which includes a few optional extra features that aren’t required in the Linux kernel and information about using the code outside the Linux kernel.}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(heFor userspace, `XZ Utils`_ provide a zlib-like compression library and a gzip-like command line tool.h](hFor userspace, }(hjhhhNhNubh)}(h `XZ Utils`_h]hXZ Utils}(hjhhhNhNubah}(h]h ]h"]h$]h&]nameXZ Utilsjhttps://tukaani.org/xz/uh1hhjjKubhK provide a zlib-like compression library and a gzip-like command line tool.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubhtarget)}(h5.. _XZ Embedded: https://tukaani.org/xz/embedded.htmlh]h}(h] xz-embeddedah ]h"] xz embeddedah$]h&]jjuh1j4hKhhhhhh referencedKubj5)}(h%.. _XZ Utils: https://tukaani.org/xz/h]h}(h]xz-utilsah ]h"]xz utilsah$]h&]jj)uh1j4hKhhhhhhjBKubeh}(h] introductionah ]h"] introductionah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h#XZ related components in the kernelh]h#XZ related components in the kernel}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjWhhhhhKubh)}(hThe xz_dec module provides XZ decompressor with single-call (buffer to buffer) and multi-call (stateful) APIs in include/linux/xz.h.h]hThe xz_dec module provides XZ decompressor with single-call (buffer to buffer) and multi-call (stateful) APIs in include/linux/xz.h.}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjWhhubh)}(hFor decompressing the kernel image, initramfs, and initrd, there is a wrapper function in lib/decompress_unxz.c. Its API is the same as in other decompress_*.c files, which is defined in include/linux/decompress/generic.h.h]hFor decompressing the kernel image, initramfs, and initrd, there is a wrapper function in lib/decompress_unxz.c. Its API is the same as in other decompress_*.c files, which is defined in include/linux/decompress/generic.h.}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjWhhubh)}(h~For kernel makefiles, three commands are provided for use with ``$(call if_changed)``. They require the xz tool from XZ Utils.h](h?For kernel makefiles, three commands are provided for use with }(hjhhhNhNubhliteral)}(h``$(call if_changed)``h]h$(call if_changed)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh). They require the xz tool from XZ Utils.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK$hjWhhubh bullet_list)}(hhh](h list_item)}(h``$(call if_changed,xzkern)`` is for compressing the kernel image. It runs the script scripts/xz_wrap.sh which uses arch-optimized options and a big LZMA2 dictionary. h]h)}(h``$(call if_changed,xzkern)`` is for compressing the kernel image. It runs the script scripts/xz_wrap.sh which uses arch-optimized options and a big LZMA2 dictionary.h](j)}(h``$(call if_changed,xzkern)``h]h$(call if_changed,xzkern)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is for compressing the kernel image. It runs the script scripts/xz_wrap.sh which uses arch-optimized options and a big LZMA2 dictionary.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK'hjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h``$(call if_changed,xzkern_with_size)`` is like ``xzkern`` above but this also appends a four-byte trailer containing the uncompressed size of the file. The trailer is needed by the boot code on some archs. h]h)}(h``$(call if_changed,xzkern_with_size)`` is like ``xzkern`` above but this also appends a four-byte trailer containing the uncompressed size of the file. The trailer is needed by the boot code on some archs.h](j)}(h'``$(call if_changed,xzkern_with_size)``h]h#$(call if_changed,xzkern_with_size)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is like }(hjhhhNhNubj)}(h ``xzkern``h]hxzkern}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh above but this also appends a four-byte trailer containing the uncompressed size of the file. The trailer is needed by the boot code on some archs.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK+hjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hzOther things can be compressed with ``$(call if_needed,xzmisc)`` which will use no BCJ filter and 1 MiB LZMA2 dictionary. h]h)}(hyOther things can be compressed with ``$(call if_needed,xzmisc)`` which will use no BCJ filter and 1 MiB LZMA2 dictionary.h](h$Other things can be compressed with }(hjhhhNhNubj)}(h``$(call if_needed,xzmisc)``h]h$(call if_needed,xzmisc)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh9 which will use no BCJ filter and 1 MiB LZMA2 dictionary.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK/hj ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]h ]h"]h$]h&]bullet-uh1jhhhK'hjWhhubeh}(h]#xz-related-components-in-the-kernelah ]h"]#xz related components in the kernelah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hNotes on compression optionsh]hNotes on compression options}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjEhhhhhK3ubh)}(hXSince the XZ Embedded supports only streams with CRC32 or no integrity check, make sure that you don't use some other integrity check type when encoding files that are supposed to be decoded by the kernel. With liblzma from XZ Utils, you need to use either ``LZMA_CHECK_CRC32`` or ``LZMA_CHECK_NONE`` when encoding. With the ``xz`` command line tool, use ``--check=crc32`` or ``--check=none`` to override the default ``--check=crc64``.h](hXSince the XZ Embedded supports only streams with CRC32 or no integrity check, make sure that you don’t use some other integrity check type when encoding files that are supposed to be decoded by the kernel. With liblzma from XZ Utils, you need to use either }(hjVhhhNhNubj)}(h``LZMA_CHECK_CRC32``h]hLZMA_CHECK_CRC32}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjVubh or }(hjVhhhNhNubj)}(h``LZMA_CHECK_NONE``h]hLZMA_CHECK_NONE}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1jhjVubh when encoding. With the }(hjVhhhNhNubj)}(h``xz``h]hxz}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjVubh command line tool, use }(hjVhhhNhNubj)}(h``--check=crc32``h]h --check=crc32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjVubh or }(hjVhhhNhNubj)}(h``--check=none``h]h --check=none}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjVubh to override the default }(hjVhhhNhNubj)}(h``--check=crc64``h]h --check=crc64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjVubh.}(hjVhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK5hjEhhubh)}(hXUsing CRC32 is strongly recommended unless there is some other layer which will verify the integrity of the uncompressed data anyway. Double checking the integrity would probably be waste of CPU cycles. Note that the headers will always have a CRC32 which will be validated by the decoder; you can only change the integrity check type (or disable it) for the actual uncompressed data.h]hXUsing CRC32 is strongly recommended unless there is some other layer which will verify the integrity of the uncompressed data anyway. Double checking the integrity would probably be waste of CPU cycles. Note that the headers will always have a CRC32 which will be validated by the decoder; you can only change the integrity check type (or disable it) for the actual uncompressed data.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK=hjEhhubh)}(hIn userspace, LZMA2 is typically used with dictionary sizes of several megabytes. The decoder needs to have the dictionary in RAM:h]hIn userspace, LZMA2 is typically used with dictionary sizes of several megabytes. The decoder needs to have the dictionary in RAM:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKDhjEhhubj)}(hhh](j)}(hX In multi-call mode the dictionary is allocated as part of the decoder state. The reasonable maximum dictionary size for in-kernel use will depend on the target hardware: a few megabytes is fine for desktop systems while 64 KiB to 1 MiB might be more appropriate on some embedded systems. h]h)}(hXIn multi-call mode the dictionary is allocated as part of the decoder state. The reasonable maximum dictionary size for in-kernel use will depend on the target hardware: a few megabytes is fine for desktop systems while 64 KiB to 1 MiB might be more appropriate on some embedded systems.h]hXIn multi-call mode the dictionary is allocated as part of the decoder state. The reasonable maximum dictionary size for in-kernel use will depend on the target hardware: a few megabytes is fine for desktop systems while 64 KiB to 1 MiB might be more appropriate on some embedded systems.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKGhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hXIn single-call mode the output buffer is used as the dictionary buffer. That is, the size of the dictionary doesn't affect the decompressor memory usage at all. Only the base data structures are allocated which take a little less than 30 KiB of memory. For the best compression, the dictionary should be at least as big as the uncompressed data. A notable example of single-call mode is decompressing the kernel itself (except on PowerPC). h]h)}(hXIn single-call mode the output buffer is used as the dictionary buffer. That is, the size of the dictionary doesn't affect the decompressor memory usage at all. Only the base data structures are allocated which take a little less than 30 KiB of memory. For the best compression, the dictionary should be at least as big as the uncompressed data. A notable example of single-call mode is decompressing the kernel itself (except on PowerPC).h]hXIn single-call mode the output buffer is used as the dictionary buffer. That is, the size of the dictionary doesn’t affect the decompressor memory usage at all. Only the base data structures are allocated which take a little less than 30 KiB of memory. For the best compression, the dictionary should be at least as big as the uncompressed data. A notable example of single-call mode is decompressing the kernel itself (except on PowerPC).}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKMhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]h ]h"]h$]h&]j;j<uh1jhhhKGhjEhhubh)}(hXThe compression presets in XZ Utils may not be optimal when creating files for the kernel, so don't hesitate to use custom settings to, for example, set the dictionary size. Also, xz may produce a smaller file in single-threaded mode so setting that explicitly is recommended. Example::h]hXThe compression presets in XZ Utils may not be optimal when creating files for the kernel, so don’t hesitate to use custom settings to, for example, set the dictionary size. Also, xz may produce a smaller file in single-threaded mode so setting that explicitly is recommended. Example:}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKUhjEhhubh literal_block)}(h:xz --threads=1 --check=crc32 --lzma2=dict=512KiB inputfileh]h:xz --threads=1 --check=crc32 --lzma2=dict=512KiB inputfile}hj5sbah}(h]h ]h"]h$]h&]hhuh1j3hhhK[hjEhhubeh}(h]notes-on-compression-optionsah ]h"]notes on compression optionsah$]h&]uh1hhhhhhhhK3ubh)}(hhh](h)}(h xz_dec APIh]h xz_dec API}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjKhhhhhK^ubh)}(h1This is available with ``#include ``.h](hThis is available with }(hj\hhhNhNubj)}(h``#include ``h]h#include }(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\ubh.}(hj\hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK`hjKhhubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singlexz_mode (C enum) c.xz_modehNtauh1j|hjKhhhNhNubhdesc)}(hhh](hdesc_signature)}(hxz_modeh]hdesc_signature_line)}(h enum xz_modeh](hdesc_sig_keyword)}(henumh]henum}(hjhhhNhNubah}(h]h ]kah"]h$]h&]uh1jhjhhhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhKubhdesc_sig_space)}(h h]h }(hjhhhNhNubah}(h]h ]wah"]h$]h&]uh1jhjhhhjhKubh desc_name)}(hxz_modeh]h desc_sig_name)}(hjh]hxz_mode}(hjhhhNhNubah}(h]h ]nah"]h$]h&]uh1jhjubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]hh add_permalinkuh1jsphinx_line_type declaratorhjhhhjhKubah}(h]jah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1jhjhKhjhhubh desc_content)}(hhh]h)}(hOperation modeh]hOperation mode}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhKhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhKubeh}(h]h ](cenumeh"]h$]h&]domainjobjtypejdesctypejnoindex noindexentrynocontentsentryuh1jhhhjKhNhNubh container)}(hX**Constants** ``XZ_SINGLE`` Single-call mode. This uses less RAM than multi-call modes, because the LZMA2 dictionary doesn't need to be allocated as part of the decoder state. All required data structures are allocated at initialization, so xz_dec_run() cannot return XZ_MEM_ERROR. ``XZ_PREALLOC`` Multi-call mode with preallocated LZMA2 dictionary buffer. All data structures are allocated at initialization, so xz_dec_run() cannot return XZ_MEM_ERROR. ``XZ_DYNALLOC`` Multi-call mode. The LZMA2 dictionary is allocated once the required size has been parsed from the stream headers. If the allocation fails, xz_dec_run() will return XZ_MEM_ERROR.h](h)}(h **Constants**h]hstrong)}(hj#h]h Constants}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1j%hj!ubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhKhjubhdefinition_list)}(hhh](hdefinition_list_item)}(hX ``XZ_SINGLE`` Single-call mode. This uses less RAM than multi-call modes, because the LZMA2 dictionary doesn't need to be allocated as part of the decoder state. All required data structures are allocated at initialization, so xz_dec_run() cannot return XZ_MEM_ERROR. h](hterm)}(h ``XZ_SINGLE``h]j)}(hjJh]h XZ_SINGLE}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjHubah}(h]h ]h"]h$]h&]uh1jFhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhK"hjBubh definition)}(hhh]h)}(hSingle-call mode. This uses less RAM than multi-call modes, because the LZMA2 dictionary doesn't need to be allocated as part of the decoder state. All required data structures are allocated at initialization, so xz_dec_run() cannot return XZ_MEM_ERROR.h]hSingle-call mode. This uses less RAM than multi-call modes, because the LZMA2 dictionary doesn’t need to be allocated as part of the decoder state. All required data structures are allocated at initialization, so xz_dec_run() cannot return XZ_MEM_ERROR.}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhKhjbubah}(h]h ]h"]h$]h&]uh1j`hjBubeh}(h]h ]h"]h$]h&]uh1j@hj_hK"hj=ubjA)}(h``XZ_PREALLOC`` Multi-call mode with preallocated LZMA2 dictionary buffer. All data structures are allocated at initialization, so xz_dec_run() cannot return XZ_MEM_ERROR. h](jG)}(h``XZ_PREALLOC``h]j)}(hjh]h XZ_PREALLOC}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jFhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhK(hjubja)}(hhh]h)}(hMulti-call mode with preallocated LZMA2 dictionary buffer. All data structures are allocated at initialization, so xz_dec_run() cannot return XZ_MEM_ERROR.h]hMulti-call mode with preallocated LZMA2 dictionary buffer. All data structures are allocated at initialization, so xz_dec_run() cannot return XZ_MEM_ERROR.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhK%hjubah}(h]h ]h"]h$]h&]uh1j`hjubeh}(h]h ]h"]h$]h&]uh1j@hjhK(hj=ubjA)}(h``XZ_DYNALLOC`` Multi-call mode. The LZMA2 dictionary is allocated once the required size has been parsed from the stream headers. If the allocation fails, xz_dec_run() will return XZ_MEM_ERROR.h](jG)}(h``XZ_DYNALLOC``h]j)}(hjh]h XZ_DYNALLOC}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jFhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhK.hjubja)}(hhh]h)}(hMulti-call mode. The LZMA2 dictionary is allocated once the required size has been parsed from the stream headers. If the allocation fails, xz_dec_run() will return XZ_MEM_ERROR.h]hMulti-call mode. The LZMA2 dictionary is allocated once the required size has been parsed from the stream headers. If the allocation fails, xz_dec_run() will return XZ_MEM_ERROR.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhK+hjubah}(h]h ]h"]h$]h&]uh1j`hjubeh}(h]h ]h"]h$]h&]uh1j@hjhK.hj=ubeh}(h]h ]h"]h$]h&]uh1j;hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjKhhhNhNubh)}(h**Description**h]j&)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j%hjubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhK2hjKhhubh)}(hX4It is possible to enable support only for a subset of the above modes at compile time by defining XZ_DEC_SINGLE, XZ_DEC_PREALLOC, or XZ_DEC_DYNALLOC. The xz_dec kernel module is always compiled with support for all operation modes, but the preboot code may be built with fewer features to minimize code size.h]hX4It is possible to enable support only for a subset of the above modes at compile time by defining XZ_DEC_SINGLE, XZ_DEC_PREALLOC, or XZ_DEC_DYNALLOC. The xz_dec kernel module is always compiled with support for all operation modes, but the preboot code may be built with fewer features to minimize code size.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhK(hjKhhubj})}(hhh]h}(h]h ]h"]h$]h&]entries](jxz_ret (C enum)c.xz_rethNtauh1j|hjKhhhNhNubj)}(hhh](j)}(hxz_reth]j)}(h enum xz_reth](j)}(hjh]henum}(hjAhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj=hhhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhK1ubj)}(h h]h }(hjOhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj=hhhjNhK1ubj)}(hxz_reth]j)}(hj;h]hxz_ret}(hjahhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj]ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj=hhhjNhK1ubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj9hhhjNhK1ubah}(h]j4ah ](jjeh"]h$]h&]jj)jhuh1jhjNhK1hj6hhubj)}(hhh]h)}(h Return codesh]h Return codes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhK5hjhhubah}(h]h ]h"]h$]h&]uh1jhj6hhhjNhK1ubeh}(h]h ](jenumeh"]h$]h&]jjjjjjjjjuh1jhhhjKhNhNubj)}(hX**Constants** ``XZ_OK`` Everything is OK so far. More input or more output space is required to continue. This return code is possible only in multi-call mode (XZ_PREALLOC or XZ_DYNALLOC). ``XZ_STREAM_END`` Operation finished successfully. ``XZ_UNSUPPORTED_CHECK`` Integrity check type is not supported. Decoding is still possible in multi-call mode by simply calling xz_dec_run() again. Note that this return value is used only if XZ_DEC_ANY_CHECK was defined at build time, which is not used in the kernel. Unsupported check types return XZ_OPTIONS_ERROR if XZ_DEC_ANY_CHECK was not defined at build time. ``XZ_MEM_ERROR`` Allocating memory failed. This return code is possible only if the decoder was initialized with XZ_DYNALLOC. The amount of memory that was tried to be allocated was no more than the dict_max argument given to xz_dec_init(). ``XZ_MEMLIMIT_ERROR`` A bigger LZMA2 dictionary would be needed than allowed by the dict_max argument given to xz_dec_init(). This return value is possible only in multi-call mode (XZ_PREALLOC or XZ_DYNALLOC); the single-call mode (XZ_SINGLE) ignores the dict_max argument. ``XZ_FORMAT_ERROR`` File format was not recognized (wrong magic bytes). ``XZ_OPTIONS_ERROR`` This implementation doesn't support the requested compression options. In the decoder this means that the header CRC32 matches, but the header itself specifies something that we don't support. ``XZ_DATA_ERROR`` Compressed data is corrupt. ``XZ_BUF_ERROR`` Cannot make any progress. Details are slightly different between multi-call and single-call mode; more information below.h](h)}(h **Constants**h]j&)}(hjh]h Constants}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j%hjubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhK9hjubj<)}(hhh](jA)}(h``XZ_OK`` Everything is OK so far. More input or more output space is required to continue. This return code is possible only in multi-call mode (XZ_PREALLOC or XZ_DYNALLOC). h](jG)}(h ``XZ_OK``h]j)}(hjh]hXZ_OK}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jFhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhK?hjubja)}(hhh]h)}(hEverything is OK so far. More input or more output space is required to continue. This return code is possible only in multi-call mode (XZ_PREALLOC or XZ_DYNALLOC).h]hEverything is OK so far. More input or more output space is required to continue. This return code is possible only in multi-call mode (XZ_PREALLOC or XZ_DYNALLOC).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhKin_pos and b->out_pos are not modified and the contents of the output buffer from b->out[b->out_pos] onward are undefined. This is true even after XZ_BUF_ERROR, because with some filter chains, there may be a second pass over the output buffer, and this pass cannot be properly done if the output buffer is truncated. Thus, you cannot give the single-call decoder a too small buffer and then expect to get that amount valid data from the beginning of the stream. You must use the multi-call decoder if you don't want to uncompress the whole stream.h](h)}(h**Parameters**h]j&)}(hjqh]h Parameters}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1j%hjoubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhKhjkubj<)}(hhh](jA)}(hA``struct xz_dec *s`` Decoder state allocated using xz_dec_init() h](jG)}(h``struct xz_dec *s``h]j)}(hjh]hstruct xz_dec *s}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jFhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhKhjubja)}(hhh]h)}(h+Decoder state allocated using xz_dec_init()h]h+Decoder state allocated using xz_dec_init()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j`hjubeh}(h]h ]h"]h$]h&]uh1j@hjhKhjubjA)}(h.``struct xz_buf *b`` Input and output buffers h](jG)}(h``struct xz_buf *b``h]j)}(hjh]hstruct xz_buf *b}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jFhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhKhjubja)}(hhh]h)}(hInput and output buffersh]hInput and output buffers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j`hjubeh}(h]h ]h"]h$]h&]uh1j@hjhKhjubeh}(h]h ]h"]h$]h&]uh1j;hjkubh)}(h**Description**h]j&)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j%hjubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhKhjkubh)}(hcThe possible return values depend on build options and operation mode. See enum xz_ret for details.h]hcThe possible return values depend on build options and operation mode. See enum xz_ret for details.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhKhjkubh)}(hX}Note that if an error occurs in single-call mode (return value is not XZ_STREAM_END), b->in_pos and b->out_pos are not modified and the contents of the output buffer from b->out[b->out_pos] onward are undefined. This is true even after XZ_BUF_ERROR, because with some filter chains, there may be a second pass over the output buffer, and this pass cannot be properly done if the output buffer is truncated. Thus, you cannot give the single-call decoder a too small buffer and then expect to get that amount valid data from the beginning of the stream. You must use the multi-call decoder if you don't want to uncompress the whole stream.h]hXNote that if an error occurs in single-call mode (return value is not XZ_STREAM_END), b->in_pos and b->out_pos are not modified and the contents of the output buffer from b->out[b->out_pos] onward are undefined. This is true even after XZ_BUF_ERROR, because with some filter chains, there may be a second pass over the output buffer, and this pass cannot be properly done if the output buffer is truncated. Thus, you cannot give the single-call decoder a too small buffer and then expect to get that amount valid data from the beginning of the stream. You must use the multi-call decoder if you don’t want to uncompress the whole stream.}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhKhjkubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjKhhhNhNubj})}(hhh]h}(h]h ]h"]h$]h&]entries](jxz_dec_reset (C function)c.xz_dec_resethNtauh1j|hjKhhhNhNubj)}(hhh](j)}(h$void xz_dec_reset (struct xz_dec *s)h]j)}(h#void xz_dec_reset(struct xz_dec *s)h](hdesc_sig_keyword_type)}(hvoidh]hvoid}(hjZhhhNhNubah}(h]h ]ktah"]h$]h&]uh1jXhjThhhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhKubj)}(h h]h }(hjjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjThhhjihKubj)}(h xz_dec_reseth]j)}(h xz_dec_reseth]h xz_dec_reset}(hj|hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjxubah}(h]h ](jjeh"]h$]h&]hhuh1jhjThhhjihKubj )}(h(struct xz_dec *s)h]j )}(hstruct xz_dec *sh](j)}(hj$h]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(hxz_dech]hxz_dec}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNj j )}j ]j )}j j~sbc.xz_dec_resetasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj )}(hj h]h*}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj)}(hj h]hs}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1j hjubah}(h]h ]h"]h$]h&]hhuh1j hjThhhjihKubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjPhhhjihKubah}(h]jKah ](jjeh"]h$]h&]jj)jhuh1jhjihKhjMhhubj)}(hhh]h)}(h(Reset an already allocated decoder stateh]h(Reset an already allocated decoder state}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhKhjhhubah}(h]h ]h"]h$]h&]uh1jhjMhhhjihKubeh}(h]h ](jfunctioneh"]h$]h&]jjjj2jj2jjjuh1jhhhjKhNhNubj)}(hX**Parameters** ``struct xz_dec *s`` Decoder state allocated using xz_dec_init() **Description** This function can be used to reset the multi-call decoder state without freeing and reallocating memory with xz_dec_end() and xz_dec_init(). In single-call mode, xz_dec_reset() is always called in the beginning of xz_dec_run(). Thus, explicit call to xz_dec_reset() is useful only in multi-call mode.h](h)}(h**Parameters**h]j&)}(hj<h]h Parameters}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1j%hj:ubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhKhj6ubj<)}(hhh]jA)}(hA``struct xz_dec *s`` Decoder state allocated using xz_dec_init() h](jG)}(h``struct xz_dec *s``h]j)}(hj[h]hstruct xz_dec *s}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjYubah}(h]h ]h"]h$]h&]uh1jFhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhKhjUubja)}(hhh]h)}(h+Decoder state allocated using xz_dec_init()h]h+Decoder state allocated using xz_dec_init()}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhjphKhjqubah}(h]h ]h"]h$]h&]uh1j`hjUubeh}(h]h ]h"]h$]h&]uh1j@hjphKhjRubah}(h]h ]h"]h$]h&]uh1j;hj6ubh)}(h**Description**h]j&)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j%hjubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhKhj6ubh)}(hThis function can be used to reset the multi-call decoder state without freeing and reallocating memory with xz_dec_end() and xz_dec_init().h]hThis function can be used to reset the multi-call decoder state without freeing and reallocating memory with xz_dec_end() and xz_dec_init().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhKhj6ubh)}(hIn single-call mode, xz_dec_reset() is always called in the beginning of xz_dec_run(). Thus, explicit call to xz_dec_reset() is useful only in multi-call mode.h]hIn single-call mode, xz_dec_reset() is always called in the beginning of xz_dec_run(). Thus, explicit call to xz_dec_reset() is useful only in multi-call mode.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhKhj6ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjKhhhNhNubj})}(hhh]h}(h]h ]h"]h$]h&]entries](jxz_dec_end (C function) c.xz_dec_endhNtauh1j|hjKhhhNhNubj)}(hhh](j)}(h"void xz_dec_end (struct xz_dec *s)h]j)}(h!void xz_dec_end(struct xz_dec *s)h](jY)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjhhhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhKubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhKubj)}(h xz_dec_endh]j)}(h xz_dec_endh]h xz_dec_end}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhKubj )}(h(struct xz_dec *s)h]j )}(hstruct xz_dec *sh](j)}(hj$h]hstruct}(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#ubj)}(h h]h }(hj4hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#ubh)}(hhh]j)}(hxz_dech]hxz_dec}(hjEhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjGmodnameN classnameNj j )}j ]j )}j j sb c.xz_dec_endasbuh1hhj#ubj)}(h h]h }(hjehhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#ubj )}(hj h]h*}(hjshhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj#ubj)}(hj h]hs}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#ubeh}(h]h ]h"]h$]h&]noemphhhuh1j hjubah}(h]h ]h"]h$]h&]hhuh1j hjhhhjhKubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhjhKubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jhjhKhjhhubj)}(hhh]h)}(h/Free the memory allocated for the decoder stateh]h/Free the memory allocated for the decoder state}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhKhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhKubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1jhhhjKhNhNubj)}(h**Parameters** ``struct xz_dec *s`` Decoder state allocated using xz_dec_init(). If s is NULL, this function does nothing.h](h)}(h**Parameters**h]j&)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j%hjubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhKhjubj<)}(hhh]jA)}(hk``struct xz_dec *s`` Decoder state allocated using xz_dec_init(). If s is NULL, this function does nothing.h](jG)}(h``struct xz_dec *s``h]j)}(hjh]hstruct xz_dec *s}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jFhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhKhjubja)}(hhh]h)}(hVDecoder state allocated using xz_dec_init(). If s is NULL, this function does nothing.h]hVDecoder state allocated using xz_dec_init(). If s is NULL, this function does nothing.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j`hjubeh}(h]h ]h"]h$]h&]uh1j@hjhKhjubah}(h]h ]h"]h$]h&]uh1j;hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjKhhhNhNubj5)}(h.. _MicroLZMA decompressor:h]h}(h]h ]h"]h$]h&]refidmicrolzma-decompressoruh1j4hM"hjKhhhNubh)}(h**MicroLZMA decompressor**h]j&)}(hj8h]hMicroLZMA decompressor}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1j%hj6ubah}(h]j5ah ]h"]microlzma decompressorah$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhKhjKhhexpect_referenced_by_name}jKj*sexpect_referenced_by_id}j5j*subh)}(hThis MicroLZMA header format was created for use in EROFS but may be used by others too. **In most cases one needs the XZ APIs above instead.**h](hYThis MicroLZMA header format was created for use in EROFS but may be used by others too. }(hjShhhNhNubj&)}(h6**In most cases one needs the XZ APIs above instead.**h]h2In most cases one needs the XZ APIs above instead.}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1j%hjSubeh}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhKhjKhhubh)}(hXThe compressed format supported by this decoder is a raw LZMA stream whose first byte (always 0x00) has been replaced with bitwise-negation of the LZMA properties (lc/lp/pb) byte. For example, if lc/lp/pb is 3/0/2, the first byte is 0xA2. This way the first byte can never be 0x00. Just like with LZMA2, lc + lp <= 4 must be true. The LZMA end-of-stream marker must not be used. The unused values are reserved for future use.h]hXThe compressed format supported by this decoder is a raw LZMA stream whose first byte (always 0x00) has been replaced with bitwise-negation of the LZMA properties (lc/lp/pb) byte. For example, if lc/lp/pb is 3/0/2, the first byte is 0xA2. This way the first byte can never be 0x00. Just like with LZMA2, lc + lp <= 4 must be true. The LZMA end-of-stream marker must not be used. The unused values are reserved for future use.}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhKhjKhhubj})}(hhh]h}(h]h ]h"]h$]h&]entries](j#xz_dec_microlzma_alloc (C function)c.xz_dec_microlzma_allochNtauh1j|hjKhhhNhNubj)}(hhh](j)}(hXstruct xz_dec_microlzma * xz_dec_microlzma_alloc (enum xz_mode mode, uint32_t dict_size)h]j)}(hVstruct xz_dec_microlzma *xz_dec_microlzma_alloc(enum xz_mode mode, uint32_t dict_size)h](j)}(hj$h]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhM ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhM ubh)}(hhh]j)}(hxz_dec_microlzmah]hxz_dec_microlzma}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNj j )}j ]j )}j xz_dec_microlzma_allocsbc.xz_dec_microlzma_allocasbuh1hhjhhhjhM ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhM ubj )}(hj h]h*}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhM ubj)}(hxz_dec_microlzma_alloch]j)}(hjh]hxz_dec_microlzma_alloc}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhM ubj )}(h'(enum xz_mode mode, uint32_t dict_size)h](j )}(henum xz_mode modeh](j)}(hjh]henum}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(hxz_modeh]hxz_mode}(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj2modnameN classnameNj j )}j ]jc.xz_dec_microlzma_allocasbuh1hhjubj)}(h h]h }(hjNhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hmodeh]hmode}(hj\hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1j hj ubj )}(huint32_t dict_sizeh](h)}(hhh]j)}(huint32_th]huint32_t}(hjxhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjuubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjzmodnameN classnameNj j )}j ]jc.xz_dec_microlzma_allocasbuh1hhjqubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjqubj)}(h dict_sizeh]h dict_size}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjqubeh}(h]h ]h"]h$]h&]noemphhhuh1j hj ubeh}(h]h ]h"]h$]h&]hhuh1j hjhhhjhM ubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhjhM ubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jhjhM hjhhubj)}(hhh]h)}(h)Allocate memory for the MicroLZMA decoderh]h)Allocate memory for the MicroLZMA decoder}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhKhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhM ubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1jhhhjKhNhNubj)}(hX**Parameters** ``enum xz_mode mode`` XZ_SINGLE or XZ_PREALLOC ``uint32_t dict_size`` LZMA dictionary size. This must be at least 4 KiB and at most 3 GiB. **Description** In contrast to xz_dec_init(), this function only allocates the memory and remembers the dictionary size. xz_dec_microlzma_reset() must be used before calling xz_dec_microlzma_run(). The amount of allocated memory is a little less than 30 KiB with XZ_SINGLE. With XZ_PREALLOC also a dictionary buffer of dict_size bytes is allocated. On success, xz_dec_microlzma_alloc() returns a pointer to struct xz_dec_microlzma. If memory allocation fails or dict_size is invalid, NULL is returned.h](h)}(h**Parameters**h]j&)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j%hjubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhKhjubj<)}(hhh](jA)}(h/``enum xz_mode mode`` XZ_SINGLE or XZ_PREALLOC h](jG)}(h``enum xz_mode mode``h]j)}(hjh]henum xz_mode mode}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jFhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhKhj ubja)}(hhh]h)}(hXZ_SINGLE or XZ_PREALLOCh]hXZ_SINGLE or XZ_PREALLOC}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$hKhj%ubah}(h]h ]h"]h$]h&]uh1j`hj ubeh}(h]h ]h"]h$]h&]uh1j@hj$hKhjubjA)}(h\``uint32_t dict_size`` LZMA dictionary size. This must be at least 4 KiB and at most 3 GiB. h](jG)}(h``uint32_t dict_size``h]j)}(hjHh]huint32_t dict_size}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjFubah}(h]h ]h"]h$]h&]uh1jFhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhKhjBubja)}(hhh]h)}(hDLZMA dictionary size. This must be at least 4 KiB and at most 3 GiB.h]hDLZMA dictionary size. This must be at least 4 KiB and at most 3 GiB.}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhKhj^ubah}(h]h ]h"]h$]h&]uh1j`hjBubeh}(h]h ]h"]h$]h&]uh1j@hj]hKhjubeh}(h]h ]h"]h$]h&]uh1j;hjubh)}(h**Description**h]j&)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j%hjubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhKhjubh)}(hIn contrast to xz_dec_init(), this function only allocates the memory and remembers the dictionary size. xz_dec_microlzma_reset() must be used before calling xz_dec_microlzma_run().h]hIn contrast to xz_dec_init(), this function only allocates the memory and remembers the dictionary size. xz_dec_microlzma_reset() must be used before calling xz_dec_microlzma_run().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhKhjubh)}(hThe amount of allocated memory is a little less than 30 KiB with XZ_SINGLE. With XZ_PREALLOC also a dictionary buffer of dict_size bytes is allocated.h]hThe amount of allocated memory is a little less than 30 KiB with XZ_SINGLE. With XZ_PREALLOC also a dictionary buffer of dict_size bytes is allocated.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhMhjubh)}(hOn success, xz_dec_microlzma_alloc() returns a pointer to struct xz_dec_microlzma. If memory allocation fails or dict_size is invalid, NULL is returned.h]hOn success, xz_dec_microlzma_alloc() returns a pointer to struct xz_dec_microlzma. If memory allocation fails or dict_size is invalid, NULL is returned.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjKhhhNhNubj})}(hhh]h}(h]h ]h"]h$]h&]entries](j#xz_dec_microlzma_reset (C function)c.xz_dec_microlzma_resethNtauh1j|hjKhhhNhNubj)}(hhh](j)}(h|void xz_dec_microlzma_reset (struct xz_dec_microlzma *s, uint32_t comp_size, uint32_t uncomp_size, int uncomp_size_is_exact)h]j)}(h{void xz_dec_microlzma_reset(struct xz_dec_microlzma *s, uint32_t comp_size, uint32_t uncomp_size, int uncomp_size_is_exact)h](jY)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhjhhhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMubj)}(hxz_dec_microlzma_reseth]j)}(hxz_dec_microlzma_reseth]hxz_dec_microlzma_reset}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhMubj )}(h`(struct xz_dec_microlzma *s, uint32_t comp_size, uint32_t uncomp_size, int uncomp_size_is_exact)h](j )}(hstruct xz_dec_microlzma *sh](j)}(hj$h]hstruct}(hj$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(h h]h }(hj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubh)}(hhh]j)}(hxz_dec_microlzmah]hxz_dec_microlzma}(hjBhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjDmodnameN classnameNj j )}j ]j )}j j sbc.xz_dec_microlzma_resetasbuh1hhj ubj)}(h h]h }(hjbhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj )}(hj h]h*}(hjphhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj)}(hj h]hs}(hj}hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]noemphhhuh1j hjubj )}(huint32_t comp_sizeh](h)}(hhh]j)}(huint32_th]huint32_t}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNj j )}j ]j^c.xz_dec_microlzma_resetasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h comp_sizeh]h comp_size}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1j hjubj )}(huint32_t uncomp_sizeh](h)}(hhh]j)}(huint32_th]huint32_t}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNj j )}j ]j^c.xz_dec_microlzma_resetasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h uncomp_sizeh]h uncomp_size}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1j hjubj )}(hint uncomp_size_is_exacth](jY)}(hinth]hint}(hj%hhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj!ubj)}(h h]h }(hj3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubj)}(huncomp_size_is_exacth]huncomp_size_is_exact}(hjAhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubeh}(h]h ]h"]h$]h&]noemphhhuh1j hjubeh}(h]h ]h"]h$]h&]hhuh1j hjhhhjhMubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhjhMubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jhjhMhjhhubj)}(hhh]h)}(h!Reset the MicroLZMA decoder stateh]h!Reset the MicroLZMA decoder state}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhMhjhhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1jhhhjKhNhNubj)}(hX**Parameters** ``struct xz_dec_microlzma *s`` Decoder state allocated using xz_dec_microlzma_alloc() ``uint32_t comp_size`` Compressed size of the input stream ``uint32_t uncomp_size`` Uncompressed size of the input stream. A value smaller than the real uncompressed size of the input stream can be specified if uncomp_size_is_exact is set to false. uncomp_size can never be set to a value larger than the expected real uncompressed size because it would eventually result in XZ_DATA_ERROR. ``int uncomp_size_is_exact`` This is an int instead of bool to avoid requiring stdbool.h. This should normally be set to true. When this is set to false, error detection is weaker.h](h)}(h**Parameters**h]j&)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j%hjubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhMhjubj<)}(hhh](jA)}(hV``struct xz_dec_microlzma *s`` Decoder state allocated using xz_dec_microlzma_alloc() h](jG)}(h``struct xz_dec_microlzma *s``h]j)}(hjh]hstruct xz_dec_microlzma *s}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jFhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhMhjubja)}(hhh]h)}(h6Decoder state allocated using xz_dec_microlzma_alloc()h]h6Decoder state allocated using xz_dec_microlzma_alloc()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j`hjubeh}(h]h ]h"]h$]h&]uh1j@hjhMhjubjA)}(h;``uint32_t comp_size`` Compressed size of the input stream h](jG)}(h``uint32_t comp_size``h]j)}(hjh]huint32_t comp_size}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jFhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhMhjubja)}(hhh]h)}(h#Compressed size of the input streamh]h#Compressed size of the input stream}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j`hjubeh}(h]h ]h"]h$]h&]uh1j@hjhMhjubjA)}(hXK``uint32_t uncomp_size`` Uncompressed size of the input stream. A value smaller than the real uncompressed size of the input stream can be specified if uncomp_size_is_exact is set to false. uncomp_size can never be set to a value larger than the expected real uncompressed size because it would eventually result in XZ_DATA_ERROR. h](jG)}(h``uint32_t uncomp_size``h]j)}(hjh]huint32_t uncomp_size}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jFhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhMhjubja)}(hhh]h)}(hX1Uncompressed size of the input stream. A value smaller than the real uncompressed size of the input stream can be specified if uncomp_size_is_exact is set to false. uncomp_size can never be set to a value larger than the expected real uncompressed size because it would eventually result in XZ_DATA_ERROR.h]hX1Uncompressed size of the input stream. A value smaller than the real uncompressed size of the input stream can be specified if uncomp_size_is_exact is set to false. uncomp_size can never be set to a value larger than the expected real uncompressed size because it would eventually result in XZ_DATA_ERROR.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhMhj4ubah}(h]h ]h"]h$]h&]uh1j`hjubeh}(h]h ]h"]h$]h&]uh1j@hj3hMhjubjA)}(h``int uncomp_size_is_exact`` This is an int instead of bool to avoid requiring stdbool.h. This should normally be set to true. When this is set to false, error detection is weaker.h](jG)}(h``int uncomp_size_is_exact``h]j)}(hjXh]hint uncomp_size_is_exact}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjVubah}(h]h ]h"]h$]h&]uh1jFhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhMhjRubja)}(hhh]h)}(hThis is an int instead of bool to avoid requiring stdbool.h. This should normally be set to true. When this is set to false, error detection is weaker.h]hThis is an int instead of bool to avoid requiring stdbool.h. This should normally be set to true. When this is set to false, error detection is weaker.}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhMhjnubah}(h]h ]h"]h$]h&]uh1j`hjRubeh}(h]h ]h"]h$]h&]uh1j@hjmhMhjubeh}(h]h ]h"]h$]h&]uh1j;hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjKhhhNhNubj})}(hhh]h}(h]h ]h"]h$]h&]entries](j!xz_dec_microlzma_run (C function)c.xz_dec_microlzma_runhNtauh1j|hjKhhhNhNubj)}(hhh](j)}(hOenum xz_ret xz_dec_microlzma_run (struct xz_dec_microlzma *s, struct xz_buf *b)h]j)}(hNenum xz_ret xz_dec_microlzma_run(struct xz_dec_microlzma *s, struct xz_buf *b)h](j)}(hjh]henum}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhMBubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMBubh)}(hhh]j)}(hxz_reth]hxz_ret}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNj j )}j ]j )}j xz_dec_microlzma_runsbc.xz_dec_microlzma_runasbuh1hhjhhhjhMBubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMBubj)}(hxz_dec_microlzma_runh]j)}(hjh]hxz_dec_microlzma_run}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhMBubj )}(h.(struct xz_dec_microlzma *s, struct xz_buf *b)h](j )}(hstruct xz_dec_microlzma *sh](j)}(hj$h]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(hxz_dec_microlzmah]hxz_dec_microlzma}(hj=hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj:ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj?modnameN classnameNj j )}j ]jc.xz_dec_microlzma_runasbuh1hhjubj)}(h h]h }(hj[hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj )}(hj h]h*}(hjihhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj)}(hj h]hs}(hjvhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1j hjubj )}(hstruct xz_buf *bh](j)}(hj$h]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(hxz_bufh]hxz_buf}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNj j )}j ]jc.xz_dec_microlzma_runasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj )}(hj h]h*}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj)}(hj'h]hb}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1j hjubeh}(h]h ]h"]h$]h&]hhuh1j hjhhhjhMBubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhjhMBubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jhjhMBhjhhubj)}(hhh]h)}(hRun the MicroLZMA decoderh]hRun the MicroLZMA decoder}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhMhj hhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhMBubeh}(h]h ](jfunctioneh"]h$]h&]jjjj&jj&jjjuh1jhhhjKhNhNubj)}(hX[**Parameters** ``struct xz_dec_microlzma *s`` Decoder state initialized using xz_dec_microlzma_reset() ``struct xz_buf *b`` Input and output buffers **Description** This works similarly to xz_dec_run() with a few important differences. Only the differences are documented here. The only possible return values are XZ_OK, XZ_STREAM_END, and XZ_DATA_ERROR. This function cannot return XZ_BUF_ERROR: if no progress is possible due to lack of input data or output space, this function will keep returning XZ_OK. Thus, the calling code must be written so that it will eventually provide input and output space matching (or exceeding) comp_size and uncomp_size arguments given to xz_dec_microlzma_reset(). If the caller cannot do this (for example, if the input file is truncated or otherwise corrupt), the caller must detect this error by itself to avoid an infinite loop. If the compressed data seems to be corrupt, XZ_DATA_ERROR is returned. This can happen also when incorrect dictionary, uncompressed, or compressed sizes have been specified. With XZ_PREALLOC only: As an extra feature, b->out may be NULL to skip over uncompressed data. This way the caller doesn't need to provide a temporary output buffer for the bytes that will be ignored. With XZ_SINGLE only: In contrast to xz_dec_run(), the return value XZ_OK is also possible and thus XZ_SINGLE is actually a limited multi-call mode. After XZ_OK the bytes decoded so far may be read from the output buffer. It is possible to continue decoding but the variables b->out and b->out_pos MUST NOT be changed by the caller. Increasing the value of b->out_size is allowed to make more output space available; one doesn't need to provide space for the whole uncompressed data on the first call. The input buffer may be changed normally like with XZ_PREALLOC. This way input data can be provided from non-contiguous memory.h](h)}(h**Parameters**h]j&)}(hj0h]h Parameters}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1j%hj.ubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhM#hj*ubj<)}(hhh](jA)}(hX``struct xz_dec_microlzma *s`` Decoder state initialized using xz_dec_microlzma_reset() h](jG)}(h``struct xz_dec_microlzma *s``h]j)}(hjOh]hstruct xz_dec_microlzma *s}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjMubah}(h]h ]h"]h$]h&]uh1jFhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhM hjIubja)}(hhh]h)}(h8Decoder state initialized using xz_dec_microlzma_reset()h]h8Decoder state initialized using xz_dec_microlzma_reset()}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjdhM hjeubah}(h]h ]h"]h$]h&]uh1j`hjIubeh}(h]h ]h"]h$]h&]uh1j@hjdhM hjFubjA)}(h.``struct xz_buf *b`` Input and output buffers h](jG)}(h``struct xz_buf *b``h]j)}(hjh]hstruct xz_buf *b}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jFhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhM!hjubja)}(hhh]h)}(hInput and output buffersh]hInput and output buffers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM!hjubah}(h]h ]h"]h$]h&]uh1j`hjubeh}(h]h ]h"]h$]h&]uh1j@hjhM!hjFubeh}(h]h ]h"]h$]h&]uh1j;hj*ubh)}(h**Description**h]j&)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j%hjubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhM#hj*ubh)}(hpThis works similarly to xz_dec_run() with a few important differences. Only the differences are documented here.h]hpThis works similarly to xz_dec_run() with a few important differences. Only the differences are documented here.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhM#hj*ubh)}(hXMThe only possible return values are XZ_OK, XZ_STREAM_END, and XZ_DATA_ERROR. This function cannot return XZ_BUF_ERROR: if no progress is possible due to lack of input data or output space, this function will keep returning XZ_OK. Thus, the calling code must be written so that it will eventually provide input and output space matching (or exceeding) comp_size and uncomp_size arguments given to xz_dec_microlzma_reset(). If the caller cannot do this (for example, if the input file is truncated or otherwise corrupt), the caller must detect this error by itself to avoid an infinite loop.h]hXMThe only possible return values are XZ_OK, XZ_STREAM_END, and XZ_DATA_ERROR. This function cannot return XZ_BUF_ERROR: if no progress is possible due to lack of input data or output space, this function will keep returning XZ_OK. Thus, the calling code must be written so that it will eventually provide input and output space matching (or exceeding) comp_size and uncomp_size arguments given to xz_dec_microlzma_reset(). If the caller cannot do this (for example, if the input file is truncated or otherwise corrupt), the caller must detect this error by itself to avoid an infinite loop.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhM&hj*ubh)}(hIf the compressed data seems to be corrupt, XZ_DATA_ERROR is returned. This can happen also when incorrect dictionary, uncompressed, or compressed sizes have been specified.h]hIf the compressed data seems to be corrupt, XZ_DATA_ERROR is returned. This can happen also when incorrect dictionary, uncompressed, or compressed sizes have been specified.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhM0hj*ubh)}(hWith XZ_PREALLOC only: As an extra feature, b->out may be NULL to skip over uncompressed data. This way the caller doesn't need to provide a temporary output buffer for the bytes that will be ignored.h]hWith XZ_PREALLOC only: As an extra feature, b->out may be NULL to skip over uncompressed data. This way the caller doesn’t need to provide a temporary output buffer for the bytes that will be ignored.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhM4hj*ubh)}(hXtWith XZ_SINGLE only: In contrast to xz_dec_run(), the return value XZ_OK is also possible and thus XZ_SINGLE is actually a limited multi-call mode. After XZ_OK the bytes decoded so far may be read from the output buffer. It is possible to continue decoding but the variables b->out and b->out_pos MUST NOT be changed by the caller. Increasing the value of b->out_size is allowed to make more output space available; one doesn't need to provide space for the whole uncompressed data on the first call. The input buffer may be changed normally like with XZ_PREALLOC. This way input data can be provided from non-contiguous memory.h]hXvWith XZ_SINGLE only: In contrast to xz_dec_run(), the return value XZ_OK is also possible and thus XZ_SINGLE is actually a limited multi-call mode. After XZ_OK the bytes decoded so far may be read from the output buffer. It is possible to continue decoding but the variables b->out and b->out_pos MUST NOT be changed by the caller. Increasing the value of b->out_size is allowed to make more output space available; one doesn’t need to provide space for the whole uncompressed data on the first call. The input buffer may be changed normally like with XZ_PREALLOC. This way input data can be provided from non-contiguous memory.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhM8hj*ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjKhhhNhNubj})}(hhh]h}(h]h ]h"]h$]h&]entries](j!xz_dec_microlzma_end (C function)c.xz_dec_microlzma_endhNtauh1j|hjKhhhNhNubj)}(hhh](j)}(h6void xz_dec_microlzma_end (struct xz_dec_microlzma *s)h]j)}(h5void xz_dec_microlzma_end(struct xz_dec_microlzma *s)h](jY)}(hvoidh]hvoid}(hjDhhhNhNubah}(h]h ]jeah"]h$]h&]uh1jXhj@hhhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhMIubj)}(h h]h }(hjShhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj@hhhjRhMIubj)}(hxz_dec_microlzma_endh]j)}(hxz_dec_microlzma_endh]hxz_dec_microlzma_end}(hjehhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjaubah}(h]h ](jjeh"]h$]h&]hhuh1jhj@hhhjRhMIubj )}(h(struct xz_dec_microlzma *s)h]j )}(hstruct xz_dec_microlzma *sh](j)}(hj$h]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj}ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj}ubh)}(hhh]j)}(hxz_dec_microlzmah]hxz_dec_microlzma}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNj j )}j ]j )}j jgsbc.xz_dec_microlzma_endasbuh1hhj}ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj}ubj )}(hj h]h*}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj}ubj)}(hj h]hs}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj}ubeh}(h]h ]h"]h$]h&]noemphhhuh1j hjyubah}(h]h ]h"]h$]h&]hhuh1j hj@hhhjRhMIubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj<hhhjRhMIubah}(h]j7ah ](jjeh"]h$]h&]jj)jhuh1jhjRhMIhj9hhubj)}(hhh]h)}(h/Free the memory allocated for the decoder stateh]h/Free the memory allocated for the decoder state}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhMEhjhhubah}(h]h ]h"]h$]h&]uh1jhj9hhhjRhMIubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1jhhhjKhNhNubj)}(h**Parameters** ``struct xz_dec_microlzma *s`` Decoder state allocated using xz_dec_microlzma_alloc(). If s is NULL, this function does nothing.h](h)}(h**Parameters**h]j&)}(hj%h]h Parameters}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1j%hj#ubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhMIhjubj<)}(hhh]jA)}(h``struct xz_dec_microlzma *s`` Decoder state allocated using xz_dec_microlzma_alloc(). If s is NULL, this function does nothing.h](jG)}(h``struct xz_dec_microlzma *s``h]j)}(hjDh]hstruct xz_dec_microlzma *s}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjBubah}(h]h ]h"]h$]h&]uh1jFhM/var/lib/git/docbuild/linux/Documentation/staging/xz:98: ./include/linux/xz.hhMFhj>ubja)}(hhh]h)}(haDecoder state allocated using xz_dec_microlzma_alloc(). If s is NULL, this function does nothing.h]haDecoder state allocated using xz_dec_microlzma_alloc(). If s is NULL, this function does nothing.}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjYhMFhjZubah}(h]h ]h"]h$]h&]uh1j`hj>ubeh}(h]h ]h"]h$]h&]uh1j@hjYhMFhj;ubah}(h]h ]h"]h$]h&]uh1j;hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjKhhhNhNubeh}(h] xz-dec-apiah ]h"] xz_dec apiah$]h&]uh1hhhhhhhhK^ubeh}(h]xz-data-compression-in-linuxah ]h"]xz data compression in linuxah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}( xz embedded]haxz utils]jaurefids}j5]j*asnameids}(jjjTjQj?j<jLjIjBj?jHjEjjjKj5u nametypes}(jjTj?jLjBjHjjKuh}(jhjQhj<j6jIjCj?jWjEjEjjKjjj4j9jjjg jl j j jKjPjjj5j6jjjjjjj7j<u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages]hsystem_message)}(hhh]h)}(hhh]h