stream_flags_common.h revision 285830
11553Srgrimes/////////////////////////////////////////////////////////////////////////////// 274532Sru// 31553Srgrimes/// \file stream_flags_common.h 41553Srgrimes/// \brief Common stuff for Stream flags coders 51553Srgrimes// 61553Srgrimes// Author: Lasse Collin 780029Sobrien// 81553Srgrimes// This file has been put into the public domain. 91553Srgrimes// You can do whatever you want with this file. 1080029Sobrien// 111553Srgrimes/////////////////////////////////////////////////////////////////////////////// 121553Srgrimes 131553Srgrimes#ifndef LZMA_STREAM_FLAGS_COMMON_H 14189090Sed#define LZMA_STREAM_FLAGS_COMMON_H 15189090Sed 161553Srgrimes#include "common.h" 171553Srgrimes 18/// Size of the Stream Flags field 19#define LZMA_STREAM_FLAGS_SIZE 2 20 21extern const uint8_t lzma_header_magic[6]; 22extern const uint8_t lzma_footer_magic[2]; 23 24 25static inline bool 26is_backward_size_valid(const lzma_stream_flags *options) 27{ 28 return options->backward_size >= LZMA_BACKWARD_SIZE_MIN 29 && options->backward_size <= LZMA_BACKWARD_SIZE_MAX 30 && (options->backward_size & 3) == 0; 31} 32 33#endif 34