blob: 28729dbcb6f286fd02a98559161c287fd8a0b238 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
// SPDX-License-Identifier: 0BSD
///////////////////////////////////////////////////////////////////////////////
//
/// \file stream_flags_common.h
/// \brief Common stuff for Stream flags coders
//
// Author: Lasse Collin
//
///////////////////////////////////////////////////////////////////////////////
#ifndef LZMA_STREAM_FLAGS_COMMON_H
#define LZMA_STREAM_FLAGS_COMMON_H
#include "common.h"
/// Size of the Stream Flags field
#define LZMA_STREAM_FLAGS_SIZE 2
lzma_attr_visibility_hidden
extern const uint8_t lzma_header_magic[6];
lzma_attr_visibility_hidden
extern const uint8_t lzma_footer_magic[2];
static inline bool
is_backward_size_valid(const lzma_stream_flags *options)
{
return options->backward_size >= LZMA_BACKWARD_SIZE_MIN
&& options->backward_size <= LZMA_BACKWARD_SIZE_MAX
&& (options->backward_size & 3) == 0;
}
#endif
|