liblzma: CRC CLMUL: Omit is_arch_extension_supported() when not needed
[xz/debian.git] / src / liblzma / common / stream_flags_common.h
blob28729dbcb6f286fd02a98559161c287fd8a0b238
1 // SPDX-License-Identifier: 0BSD
3 ///////////////////////////////////////////////////////////////////////////////
4 //
5 /// \file stream_flags_common.h
6 /// \brief Common stuff for Stream flags coders
7 //
8 // Author: Lasse Collin
9 //
10 ///////////////////////////////////////////////////////////////////////////////
12 #ifndef LZMA_STREAM_FLAGS_COMMON_H
13 #define LZMA_STREAM_FLAGS_COMMON_H
15 #include "common.h"
17 /// Size of the Stream Flags field
18 #define LZMA_STREAM_FLAGS_SIZE 2
20 lzma_attr_visibility_hidden
21 extern const uint8_t lzma_header_magic[6];
23 lzma_attr_visibility_hidden
24 extern const uint8_t lzma_footer_magic[2];
27 static inline bool
28 is_backward_size_valid(const lzma_stream_flags *options)
30 return options->backward_size >= LZMA_BACKWARD_SIZE_MIN
31 && options->backward_size <= LZMA_BACKWARD_SIZE_MAX
32 && (options->backward_size & 3) == 0;
35 #endif