10SN/A/////////////////////////////////////////////////////////////////////////////// 20SN/A// 30SN/A/// \file stream_flags_common.h 40SN/A/// \brief Common stuff for Stream flags coders 50SN/A// 61133Sjoehw// Author: Lasse Collin 71133Sjoehw// 81133Sjoehw// This file has been put into the public domain. 91133Sjoehw// You can do whatever you want with this file. 101133Sjoehw// 111133Sjoehw/////////////////////////////////////////////////////////////////////////////// 120SN/A 131133Sjoehw#ifndef LZMA_STREAM_FLAGS_COMMON_H 140SN/A#define LZMA_STREAM_FLAGS_COMMON_H 150SN/A 160SN/A#include "common.h" 170SN/A 180SN/A/// Size of the Stream Flags field 190SN/A#define LZMA_STREAM_FLAGS_SIZE 2 200SN/A 210SN/Aextern const uint8_t lzma_header_magic[6]; 220SN/Aextern const uint8_t lzma_footer_magic[2]; 230SN/A 240SN/A 250SN/Astatic inline bool 260SN/Ais_backward_size_valid(const lzma_stream_flags *options) 270SN/A{ 280SN/A return options->backward_size >= LZMA_BACKWARD_SIZE_MIN 290SN/A && options->backward_size <= LZMA_BACKWARD_SIZE_MAX 300SN/A && (options->backward_size & 3) == 0; 310SN/A} 320SN/A 330SN/A#endif 340SN/A