1 // SPDX-License-Identifier: 0BSD
3 ///////////////////////////////////////////////////////////////////////////////
5 /// \file stream_flags_common.h
6 /// \brief Common stuff for Stream flags coders
8 // Author: Lasse Collin
10 ///////////////////////////////////////////////////////////////////////////////
12 #ifndef LZMA_STREAM_FLAGS_COMMON_H
13 #define LZMA_STREAM_FLAGS_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];
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;