Name Description Size
backward_references.c Function to find backward reference copies. 6277
backward_references.h Function to find backward reference copies. 1206
backward_references_hq.c Function to find backward reference copies. 36736
backward_references_hq.h Function to find backward reference copies. 3773
backward_references_inc.h NOLINT(build/header_guard) 8181
bit_cost.c Functions to estimate the bit cost of Huffman trees. 1427
bit_cost.h Functions to estimate the bit cost of Huffman trees. 896
bit_cost_inc.h NOLINT(build/header_guard) 4115
block_encoder_inc.h NOLINT(build/header_guard) 1137
block_splitter.c Block split point selection utilities. 7330
block_splitter.h Block split point selection utilities. 1626
block_splitter_inc.h NOLINT(build/header_guard) 18879
brotli_bit_stream.c Brotli bit stream functions to support the low level format. There are no compression algorithms here, just the right ordering of bits to match the specs. 50915
brotli_bit_stream.h Functions to convert brotli-related data structures into the brotli bit stream. The functions here operate under assumption that there is enough space in the storage, i.e., there are no out-of-range checks anywhere. These functions do bit addressing into a byte array. The byte array is called "storage" and the index to the bit is called storage_ix in function arguments. 3338
cluster.c Functions for clustering similar histograms together. 1458
cluster.h Functions for clustering similar histograms together. 997
cluster_inc.h NOLINT(build/header_guard) 11826
command.c extern "C" 1025
command.h This class models a sequence of literals and a backward reference copy. 6937
compound_dictionary.c Step 1: create "bloated" hasher. 6651
compound_dictionary.h "Fat" prepared dictionary, could be cooked outside of C implementation, e.g. on Java side. LZ77 data is copied inside PreparedDictionary struct. 2433
compress_fragment.c Function for fast encoding of an input fragment, independently from the input history. This function uses one-pass processing: when we find a backward match, we immediately emit the corresponding command and literal codes to the bit stream. Adapted from the CompressFragment() function in https://github.com/google/snappy/blob/master/snappy.cc 32875
compress_fragment.h Function for fast encoding of an input fragment, independently from the input history. This function uses one-pass processing: when we find a backward match, we immediately emit the corresponding command and literal codes to the bit stream. 3571
compress_fragment_two_pass.c Function for fast encoding of an input fragment, independently from the input history. This function uses two-pass processing: in the first pass we save the found backward matches and literal bytes into a buffer, and in the second pass we emit them into the bit stream using prefix codes built based on the actual command and literal byte histograms. 26806
compress_fragment_two_pass.h Function for fast encoding of an input fragment, independently from the input history. This function uses two-pass processing: in the first pass we save the found backward matches and literal bytes into a buffer, and in the second pass we emit them into the bit stream using prefix codes built based on the actual command and literal byte histograms. 2852
dictionary_hash.c Hash table on the 4-byte prefixes of static dictionary words. 7932
dictionary_hash.h Hash table on the 4-byte prefixes of static dictionary words. 1532
dictionary_hash_inc.h 146714
encode.c Implementation of Brotli compressor. 78417
encoder_dict.c Set up the root node 23378
encoder_dict.h Dictionary hierarchy for Encoder: -SharedEncoderDictionary --CompoundDictionary ---PreparedDictionary [up to 15x] = prefix dictionary with precomputed hashes --ContextualEncoderDictionary ---BrotliEncoderDictionary [up to 64x] = for each context, precomputed static dictionary with words + transforms Dictionary hierarchy from common: similar, but without precomputed hashes -BrotliSharedDictionary --BrotliDictionary [up to 64x] --BrotliTransforms [up to 64x] --const uint8_t* prefix [up to 15x]: compound dictionaries 5020
entropy_encode.c Entropy encoding (Huffman) utilities. 14568
entropy_encode.h Entropy encoding (Huffman) utilities. 4055
entropy_encode_static.h Static entropy codes used for faster meta-block encoding. 33144
fast_log.c ", ".join(["%.16ff" % x for x in [0.0]+[log2(x) for x in range(1, 256)]]) 6046
fast_log.h Utilities for fast computation of logarithms. 1645
find_match_length.h Function to find maximal matching prefixes of strings. 2167
hash.h A (forgetful) hash table to the data seen by the compressor, to help create backward references to previous data. 24296
hash_base.h Basic common hash functions / constants. 1370
hash_composite_inc.h NOLINT(build/header_guard) 5097
hash_forgetful_chain_inc.h NOLINT(build/header_guard) 11317
hash_longest_match_inc.h NOLINT(build/header_guard) 10589
hash_longest_match_quickly_inc.h NOLINT(build/header_guard) 9481
hash_longest_match_simd_inc.h NOLINT(build/header_guard) 11759
hash_longest_match64_inc.h NOLINT(build/header_guard) 10655
hash_longest_match64_simd_inc.h NOLINT(build/header_guard) 11835
hash_rolling_inc.h NOLINT(build/header_guard) 7226
hash_to_binary_tree_inc.h NOLINT(build/header_guard) 13081
histogram.c Build per-context histograms of literals, commands and distance codes. 3261
histogram.h Models the histograms of literals, commands and distance codes. 1813
histogram_inc.h NOLINT(build/header_guard) 1401
literal_cost.c Literal cost model to allow backward reference replacement to be efficient. 5877
literal_cost.h Literal cost model to allow backward reference replacement to be efficient. 889
matching_tag_mask.h 2343
memory.c Algorithms for distributing the literals and commands of a metablock between block types and contexts. 5522
memory.h Macros for memory management. 4296
metablock.c Algorithms for distributing the literals and commands of a metablock between block types and contexts. 26696
metablock.h Algorithms for distributing the literals and commands of a metablock between block types and contexts. 4023
metablock_inc.h NOLINT(build/header_guard) 7636
params.h Parameters for the Brotli encoder with chosen quality levels. 1168
prefix.h Functions for encoding of integers into prefix codes the amount of extra bits, and the actual values of the extra bits. 1942
quality.h Constants and formulas that affect speed-ratio trade-offs and thus define quality levels. 7864
ringbuffer.h Sliding window over the input data. 5967
state.h Encoder state. 3078
static_dict.c Match against base dictionary word. 20877
static_dict.h Class to model the static dictionary. 1215
static_dict_lut.c Lookup table for static dictionary and transforms. 7420
static_dict_lut.h Lookup table for static dictionary and transforms. 1588
static_dict_lut_inc.h 468804
static_init.h Central point for static initialization. 840
static_init_enc.c BROTLI_STATIC_INIT_NONE 1780
static_init_lazy.cc From https://en.cppreference.com/w/cpp/language/storage_duration.html: ### Static block variables ### Block variables with static or thread (since C++11) storage duration are initialized the first time control passes through their declaration... On all further calls, the declaration is skipped... If multiple threads attempt to initialize the same static local variable concurrently, the initialization occurs exactly once... Usual implementations of this feature use variants of the double-checked locking pattern, which reduces runtime overhead for already-initialized local statics to a single non-atomic boolean comparison. 1095
utf8_util.c Heuristics for deciding about the UTF8-ness of strings. 2275
utf8_util.h Heuristics for deciding about the UTF8-ness of strings. 878
write_bits.h Write bits into a byte array. 2835