Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
Loading...
Searching...
No Matches
constants.h File Reference
#include "./platform.h"
#include <brotli/port.h>
#include <brotli/types.h>

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
 
#define BROTLI_LARGE_MIN_WBITS   10
 
#define BROTLI_LARGE_MAX_WBITS   30
 
#define BROTLI_NUM_DISTANCE_SHORT_CODES   16
 
#define BROTLI_MAX_NPOSTFIX   3
 
#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)
 

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_CODE_LENGTH_CODES

#define BROTLI_CODE_LENGTH_CODES   (BROTLI_REPEAT_ZERO_CODE_LENGTH + 1)

◆ BROTLI_CONTEXT_MAP_MAX_RLE

#define BROTLI_CONTEXT_MAP_MAX_RLE   16

◆ BROTLI_DISTANCE_ALPHABET_SIZE

#define BROTLI_DISTANCE_ALPHABET_SIZE ( NPOSTFIX,
NDIRECT,
MAXNBITS )
Value:
( \
((MAXNBITS) << ((NPOSTFIX) + 1)))
#define BROTLI_NUM_DISTANCE_SHORT_CODES
Definition constants.h:60

◆ BROTLI_DISTANCE_CONTEXT_BITS

#define BROTLI_DISTANCE_CONTEXT_BITS   2

◆ BROTLI_INITIAL_REPEATED_CODE_LENGTH

#define BROTLI_INITIAL_REPEATED_CODE_LENGTH   8

◆ 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_LARGE_MIN_WBITS

#define BROTLI_LARGE_MIN_WBITS   10

◆ BROTLI_LITERAL_CONTEXT_BITS

#define BROTLI_LITERAL_CONTEXT_BITS   6

◆ BROTLI_MAX_ALLOWED_DISTANCE

#define BROTLI_MAX_ALLOWED_DISTANCE   0x7FFFFFFC

◆ BROTLI_MAX_BACKWARD_LIMIT

#define BROTLI_MAX_BACKWARD_LIMIT ( W)
Value:
(((size_t)1 << (W)) - BROTLI_WINDOW_GAP)
#define BROTLI_WINDOW_GAP
Definition constants.h:102

◆ BROTLI_MAX_BLOCK_TYPE_SYMBOLS

#define BROTLI_MAX_BLOCK_TYPE_SYMBOLS   (BROTLI_MAX_NUMBER_OF_BLOCK_TYPES + 2)

◆ BROTLI_MAX_CONTEXT_MAP_SYMBOLS

#define BROTLI_MAX_CONTEXT_MAP_SYMBOLS
Value:
#define BROTLI_MAX_NUMBER_OF_BLOCK_TYPES
Definition constants.h:23
#define BROTLI_CONTEXT_MAP_MAX_RLE
Definition constants.h:20

◆ BROTLI_MAX_DISTANCE

#define BROTLI_MAX_DISTANCE   0x3FFFFFC

◆ BROTLI_MAX_DISTANCE_BITS

#define BROTLI_MAX_DISTANCE_BITS   24U

◆ BROTLI_MAX_NDIRECT

#define BROTLI_MAX_NDIRECT   120

◆ 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_MAX_NUMBER_OF_BLOCK_TYPES

#define BROTLI_MAX_NUMBER_OF_BLOCK_TYPES   256

◆ BROTLI_NUM_BLOCK_LEN_SYMBOLS

#define BROTLI_NUM_BLOCK_LEN_SYMBOLS   26

◆ BROTLI_NUM_COMMAND_SYMBOLS

#define BROTLI_NUM_COMMAND_SYMBOLS   704

◆ BROTLI_NUM_DISTANCE_SHORT_CODES

#define BROTLI_NUM_DISTANCE_SHORT_CODES   16

◆ BROTLI_NUM_DISTANCE_SYMBOLS

#define BROTLI_NUM_DISTANCE_SYMBOLS
Value:
#define BROTLI_DISTANCE_ALPHABET_SIZE(NPOSTFIX, NDIRECT, MAXNBITS)
Definition constants.h:69
#define BROTLI_MAX_NDIRECT
Definition constants.h:67
#define BROTLI_MAX_NPOSTFIX
Definition constants.h:66
#define BROTLI_LARGE_MAX_DISTANCE_BITS
Definition constants.h:50

◆ BROTLI_NUM_INS_COPY_CODES

#define BROTLI_NUM_INS_COPY_CODES   24

◆ BROTLI_NUM_LITERAL_SYMBOLS

#define BROTLI_NUM_LITERAL_SYMBOLS   256

◆ BROTLI_REPEAT_PREVIOUS_CODE_LENGTH

#define BROTLI_REPEAT_PREVIOUS_CODE_LENGTH   16

◆ BROTLI_REPEAT_ZERO_CODE_LENGTH

#define BROTLI_REPEAT_ZERO_CODE_LENGTH   17

◆ BROTLI_WINDOW_GAP

#define BROTLI_WINDOW_GAP   16

Typedef Documentation

◆ BrotliDistanceCodeLimit

typedef struct BrotliDistanceCodeLimit BrotliDistanceCodeLimit

Function Documentation

◆ BrotliCalculateDistanceCodeLimit()

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

Variable Documentation

◆ _kBrotliPrefixCodeRanges