1207753Smm///////////////////////////////////////////////////////////////////////////////
2207753Smm//
3207753Smm/// \file       stream_flags_common.h
4207753Smm/// \brief      Common stuff for Stream flags coders
5207753Smm//
6207753Smm//  Author:     Lasse Collin
7207753Smm//
8207753Smm//  This file has been put into the public domain.
9207753Smm//  You can do whatever you want with this file.
10207753Smm//
11207753Smm///////////////////////////////////////////////////////////////////////////////
12207753Smm
13207753Smm#ifndef LZMA_STREAM_FLAGS_COMMON_H
14207753Smm#define LZMA_STREAM_FLAGS_COMMON_H
15207753Smm
16207753Smm#include "common.h"
17207753Smm
18207753Smm/// Size of the Stream Flags field
19207753Smm#define LZMA_STREAM_FLAGS_SIZE 2
20207753Smm
21207753Smmextern const uint8_t lzma_header_magic[6];
22207753Smmextern const uint8_t lzma_footer_magic[2];
23207753Smm
24207753Smm
25207753Smmstatic inline bool
26207753Smmis_backward_size_valid(const lzma_stream_flags *options)
27207753Smm{
28207753Smm	return options->backward_size >= LZMA_BACKWARD_SIZE_MIN
29207753Smm			&& options->backward_size <= LZMA_BACKWARD_SIZE_MAX
30207753Smm			&& (options->backward_size & 3) == 0;
31207753Smm}
32207753Smm
33207753Smm#endif
34