diff options
author | Jia Tan <jiat0218@gmail.com> | 2022-12-29 21:52:15 +0800 |
---|---|---|
committer | Jia Tan <jiat0218@gmail.com> | 2023-03-13 20:49:53 +0800 |
commit | af55191102f01e76de658c881299f0909ca0feda (patch) | |
tree | d4241a006c741ad84ad86b91f3e5e67f1daad9cd /src/liblzma | |
parent | Tests: Refactors existing lzma_index tests. (diff) | |
download | xz-af55191102f01e76de658c881299f0909ca0feda.tar.xz |
liblzma: Defines masks for return values from lzma_index_checks().
Diffstat (limited to '')
-rw-r--r-- | src/liblzma/api/lzma/index.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/liblzma/api/lzma/index.h b/src/liblzma/api/lzma/index.h index f7de84b5..46afe3eb 100644 --- a/src/liblzma/api/lzma/index.h +++ b/src/liblzma/api/lzma/index.h @@ -304,6 +304,28 @@ typedef enum { /** + * \brief Mask for return value from lzma_index_checks() for check none + * + * \note This and the other CHECK_MASK macros were added in 5.5.1alpha. + */ +#define LZMA_INDEX_CHECK_MASK_NONE (UINT32_C(1) << LZMA_CHECK_NONE) + +/** + * \brief Mask for return value from lzma_index_checks() for check CRC32 + */ +#define LZMA_INDEX_CHECK_MASK_CRC32 (UINT32_C(1) << LZMA_CHECK_CRC32) + +/** + * \brief Mask for return value from lzma_index_checks() for check CRC64 + */ +#define LZMA_INDEX_CHECK_MASK_CRC64 (UINT32_C(1) << LZMA_CHECK_CRC64) + +/** + * \brief Mask for return value from lzma_index_checks() for check SHA256 + */ +#define LZMA_INDEX_CHECK_MASK_SHA256 (UINT32_C(1) << LZMA_CHECK_SHA256) + +/** * \brief Calculate memory usage of lzma_index * * On disk, the size of the Index field depends on both the number of Records @@ -433,6 +455,7 @@ extern LZMA_API(lzma_ret) lzma_index_stream_flags( * showing the Check types to the user. * * The bitmask is 1 << check_id, e.g. CRC32 is 1 << 1 and SHA-256 is 1 << 10. + * These masks are defined for convenience as LZMA_INDEX_CHECK_MASK_XXX * * \param i Pointer to lzma_index structure * |