Merge pull request #187 from szabadka/master

Define the encoder dictionary in the .cc file and link only once.
This commit is contained in:
szabadka 2015-10-01 14:51:48 +02:00
commit dc416abcb7
5 changed files with 9500 additions and 9451 deletions

View File

@ -15,6 +15,10 @@
#include "./dictionary.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
/* In case of multiple definition linker error with dictionary.cc from the
encoder: include only one of enc/dictionary.cc or dec/dictionary.c in a
target using both enc and dec. */
@ -9465,3 +9469,7 @@ const uint8_t kBrotliDictionary[122784] = {
0x88, 0xe0, 0xa4, 0xb8, 0xe0, 0xa4, 0x95, 0xe0, 0xa5, 0x8d, 0xe0, 0xa4, 0xb0,
0xe0, 0xa4, 0xbf, 0xe0, 0xa4, 0xaf, 0xe0, 0xa4, 0xa4, 0xe0, 0xa4, 0xbe,
};
#if defined(__cplusplus) || defined(c_plusplus)
} /* extern "C" */
#endif

View File

@ -2,7 +2,10 @@
include ../shared.mk
OBJS = backward_references.o block_splitter.o brotli_bit_stream.o encode.o encode_parallel.o entropy_encode.o histogram.o literal_cost.o metablock.o static_dict.o streams.o
OBJS_NODICT = backward_references.o block_splitter.o brotli_bit_stream.o encode.o encode_parallel.o entropy_encode.o histogram.o literal_cost.o metablock.o static_dict.o streams.o
OBJS = $(OBJS_NODICT) dictionary.o
nodict : $(OBJS_NODICT)
all : $(OBJS)

9474
enc/dictionary.cc Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -17,7 +17,7 @@ $(EXECUTABLES) : $(EXE_OBJS) deps
deps :
$(MAKE) -C $(BROTLI)/dec
$(MAKE) -C $(BROTLI)/enc
$(MAKE) -C $(BROTLI)/enc nodict
clean :
rm -f $(OBJS) $(EXE_OBJS) $(EXECUTABLES)