wxMaxima
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Functions | Variables
constants.h File Reference

Common constants used in decoder and encoder API. More...

#include <brotli/port.h>
#include <brotli/types.h>
#include "platform.h"
Include dependency graph for constants.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  BrotliDistanceCodeLimit
 
struct  BrotliPrefixCodeRange
 

Macros

#define BROTLI_CONTEXT_MAP_MAX_RLE   16
 
#define BROTLI_MAX_NUMBER_OF_BLOCK_TYPES   256
 
#define BROTLI_NUM_LITERAL_SYMBOLS   256
 
#define BROTLI_NUM_COMMAND_SYMBOLS   704
 
#define BROTLI_NUM_BLOCK_LEN_SYMBOLS   26
 
#define BROTLI_MAX_CONTEXT_MAP_SYMBOLS
 
#define BROTLI_MAX_BLOCK_TYPE_SYMBOLS   (BROTLI_MAX_NUMBER_OF_BLOCK_TYPES + 2)
 
#define BROTLI_REPEAT_PREVIOUS_CODE_LENGTH   16
 
#define BROTLI_REPEAT_ZERO_CODE_LENGTH   17
 
#define BROTLI_CODE_LENGTH_CODES   (BROTLI_REPEAT_ZERO_CODE_LENGTH + 1)
 
#define BROTLI_INITIAL_REPEATED_CODE_LENGTH   8
 
#define BROTLI_LARGE_MAX_DISTANCE_BITS   62U
 The theoretical maximum number of distance bits specified for large window brotli, for 64-bit encoders and decoders.
 
#define BROTLI_LARGE_MIN_WBITS   10
 
#define BROTLI_LARGE_MAX_WBITS   30
 The maximum supported large brotli window bits by the encoder and decoder.
 
#define BROTLI_NUM_DISTANCE_SHORT_CODES   16
 
#define BROTLI_MAX_NPOSTFIX   3
 Maximal number of "postfix" bits.
 
#define BROTLI_MAX_NDIRECT   120
 
#define BROTLI_MAX_DISTANCE_BITS   24U
 
#define BROTLI_DISTANCE_ALPHABET_SIZE(NPOSTFIX, NDIRECT, MAXNBITS)
 
#define BROTLI_NUM_DISTANCE_SYMBOLS
 
#define BROTLI_MAX_DISTANCE   0x3FFFFFC
 
#define BROTLI_MAX_ALLOWED_DISTANCE   0x7FFFFFFC
 
#define BROTLI_NUM_INS_COPY_CODES   24
 
#define BROTLI_LITERAL_CONTEXT_BITS   6
 
#define BROTLI_DISTANCE_CONTEXT_BITS   2
 
#define BROTLI_WINDOW_GAP   16
 
#define BROTLI_MAX_BACKWARD_LIMIT(W)   (((size_t)1 << (W)) - BROTLI_WINDOW_GAP)
 

Typedefs

typedef struct BrotliDistanceCodeLimit BrotliDistanceCodeLimit
 

Functions

BROTLI_UNUSED_FUNCTION BrotliDistanceCodeLimit BrotliCalculateDistanceCodeLimit (uint32_t max_distance, uint32_t npostfix, uint32_t ndirect)
 

Variables

BROTLI_COMMON_API const BrotliPrefixCodeRange _kBrotliPrefixCodeRanges [BROTLI_NUM_BLOCK_LEN_SYMBOLS]
 

Detailed Description

Common constants used in decoder and encoder API.

Macro Definition Documentation

◆ BROTLI_DISTANCE_ALPHABET_SIZE

#define BROTLI_DISTANCE_ALPHABET_SIZE (   NPOSTFIX,
  NDIRECT,
  MAXNBITS 
)
Value:
( \
BROTLI_NUM_DISTANCE_SHORT_CODES + (NDIRECT) + \
((MAXNBITS) << ((NPOSTFIX) + 1)))

◆ BROTLI_LARGE_MAX_DISTANCE_BITS

#define BROTLI_LARGE_MAX_DISTANCE_BITS   62U

The theoretical maximum number of distance bits specified for large window brotli, for 64-bit encoders and decoders.

Even when in practice 32-bit encoders and decoders only support up to 30 max distance bits, the value is set to 62 because it affects the large window brotli file format. Specifically, it affects the encoding of simple huffman tree for distances, see Specification RFC 7932 chapter 3.4.

◆ BROTLI_LARGE_MAX_WBITS

#define BROTLI_LARGE_MAX_WBITS   30

The maximum supported large brotli window bits by the encoder and decoder.

Large window brotli allows up to 62 bits, however the current encoder and decoder, designed for 32-bit integers, only support up to 30 bits maximum.

◆ BROTLI_MAX_CONTEXT_MAP_SYMBOLS

#define BROTLI_MAX_CONTEXT_MAP_SYMBOLS
Value:
(BROTLI_MAX_NUMBER_OF_BLOCK_TYPES + \
BROTLI_CONTEXT_MAP_MAX_RLE)

◆ BROTLI_MAX_NPOSTFIX

#define BROTLI_MAX_NPOSTFIX   3

Maximal number of "postfix" bits.

Number of "postfix" bits is stored as 2 bits in meta-block header.

◆ BROTLI_NUM_DISTANCE_SYMBOLS

#define BROTLI_NUM_DISTANCE_SYMBOLS
Value:
BROTLI_DISTANCE_ALPHABET_SIZE( \
#define BROTLI_MAX_NPOSTFIX
Maximal number of "postfix" bits.
Definition: constants.h:67
#define BROTLI_LARGE_MAX_DISTANCE_BITS
The theoretical maximum number of distance bits specified for large window brotli,...
Definition: constants.h:51