aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Kliuchnikov <eustas@google.com>2017-04-23 14:07:08 +0200
committerGitHub <noreply@github.com>2017-04-23 14:07:08 +0200
commit6ece1d8791a887c1b3fd500435be97d42921cee7 (patch)
treecc5504ff795d2d28efaccc8e30d4c72e0acd1eab
parent04de756ad2b0a8f58987d415ef520467e3440f20 (diff)
downloadbrotli-6ece1d8791a887c1b3fd500435be97d42921cee7.zip
brotli-6ece1d8791a887c1b3fd500435be97d42921cee7.tar.gz
brotli-6ece1d8791a887c1b3fd500435be97d42921cee7.tar.bz2
Move files & update paths (#541)
* Move files & update paths * Rename build to scripts. * Fix paths * Fix script.
-rw-r--r--.gitmodules2
-rw-r--r--.travis.yml12
-rw-r--r--BUILD18
-rw-r--r--CMakeLists.txt56
-rw-r--r--MANIFEST.in16
-rw-r--r--Makefile10
-rw-r--r--c/common/constants.h (renamed from common/constants.h)0
-rw-r--r--c/common/dictionary.c (renamed from common/dictionary.c)0
-rw-r--r--c/common/dictionary.h (renamed from common/dictionary.h)0
-rwxr-xr-xc/common/version.h (renamed from common/version.h)0
-rw-r--r--c/dec/bit_reader.c (renamed from dec/bit_reader.c)0
-rw-r--r--c/dec/bit_reader.h (renamed from dec/bit_reader.h)0
-rw-r--r--c/dec/context.h (renamed from dec/context.h)0
-rw-r--r--c/dec/decode.c (renamed from dec/decode.c)0
-rw-r--r--c/dec/huffman.c (renamed from dec/huffman.c)0
-rw-r--r--c/dec/huffman.h (renamed from dec/huffman.h)0
-rw-r--r--c/dec/port.h (renamed from dec/port.h)0
-rw-r--r--c/dec/prefix.h (renamed from dec/prefix.h)0
-rw-r--r--c/dec/state.c (renamed from dec/state.c)0
-rw-r--r--c/dec/state.h (renamed from dec/state.h)0
-rw-r--r--c/dec/transform.h (renamed from dec/transform.h)0
-rw-r--r--c/enc/backward_references.c (renamed from enc/backward_references.c)0
-rw-r--r--c/enc/backward_references.h (renamed from enc/backward_references.h)0
-rwxr-xr-xc/enc/backward_references_hq.c (renamed from enc/backward_references_hq.c)0
-rwxr-xr-xc/enc/backward_references_hq.h (renamed from enc/backward_references_hq.h)0
-rw-r--r--c/enc/backward_references_inc.h (renamed from enc/backward_references_inc.h)0
-rw-r--r--c/enc/bit_cost.c (renamed from enc/bit_cost.c)0
-rw-r--r--c/enc/bit_cost.h (renamed from enc/bit_cost.h)0
-rw-r--r--c/enc/bit_cost_inc.h (renamed from enc/bit_cost_inc.h)0
-rw-r--r--c/enc/block_encoder_inc.h (renamed from enc/block_encoder_inc.h)0
-rw-r--r--c/enc/block_splitter.c (renamed from enc/block_splitter.c)0
-rw-r--r--c/enc/block_splitter.h (renamed from enc/block_splitter.h)0
-rw-r--r--c/enc/block_splitter_inc.h (renamed from enc/block_splitter_inc.h)0
-rw-r--r--c/enc/brotli_bit_stream.c (renamed from enc/brotli_bit_stream.c)0
-rw-r--r--c/enc/brotli_bit_stream.h (renamed from enc/brotli_bit_stream.h)0
-rw-r--r--c/enc/cluster.c (renamed from enc/cluster.c)0
-rw-r--r--c/enc/cluster.h (renamed from enc/cluster.h)0
-rw-r--r--c/enc/cluster_inc.h (renamed from enc/cluster_inc.h)0
-rw-r--r--c/enc/command.h (renamed from enc/command.h)0
-rw-r--r--c/enc/compress_fragment.c (renamed from enc/compress_fragment.c)0
-rw-r--r--c/enc/compress_fragment.h (renamed from enc/compress_fragment.h)0
-rw-r--r--c/enc/compress_fragment_two_pass.c (renamed from enc/compress_fragment_two_pass.c)0
-rw-r--r--c/enc/compress_fragment_two_pass.h (renamed from enc/compress_fragment_two_pass.h)0
-rw-r--r--c/enc/context.h (renamed from enc/context.h)0
-rwxr-xr-xc/enc/dictionary_hash.c (renamed from enc/dictionary_hash.c)0
-rw-r--r--c/enc/dictionary_hash.h (renamed from enc/dictionary_hash.h)0
-rw-r--r--c/enc/encode.c (renamed from enc/encode.c)0
-rw-r--r--c/enc/entropy_encode.c (renamed from enc/entropy_encode.c)0
-rw-r--r--c/enc/entropy_encode.h (renamed from enc/entropy_encode.h)0
-rw-r--r--c/enc/entropy_encode_static.h (renamed from enc/entropy_encode_static.h)0
-rw-r--r--c/enc/fast_log.h (renamed from enc/fast_log.h)0
-rw-r--r--c/enc/find_match_length.h (renamed from enc/find_match_length.h)0
-rw-r--r--c/enc/hash.h (renamed from enc/hash.h)0
-rwxr-xr-xc/enc/hash_forgetful_chain_inc.h (renamed from enc/hash_forgetful_chain_inc.h)0
-rwxr-xr-xc/enc/hash_longest_match64_inc.h (renamed from enc/hash_longest_match64_inc.h)0
-rw-r--r--c/enc/hash_longest_match_inc.h (renamed from enc/hash_longest_match_inc.h)0
-rw-r--r--c/enc/hash_longest_match_quickly_inc.h (renamed from enc/hash_longest_match_quickly_inc.h)0
-rwxr-xr-xc/enc/hash_to_binary_tree_inc.h (renamed from enc/hash_to_binary_tree_inc.h)0
-rw-r--r--c/enc/histogram.c (renamed from enc/histogram.c)0
-rw-r--r--c/enc/histogram.h (renamed from enc/histogram.h)0
-rw-r--r--c/enc/histogram_inc.h (renamed from enc/histogram_inc.h)0
-rw-r--r--c/enc/literal_cost.c (renamed from enc/literal_cost.c)0
-rw-r--r--c/enc/literal_cost.h (renamed from enc/literal_cost.h)0
-rw-r--r--c/enc/memory.c (renamed from enc/memory.c)0
-rw-r--r--c/enc/memory.h (renamed from enc/memory.h)0
-rw-r--r--c/enc/metablock.c (renamed from enc/metablock.c)0
-rw-r--r--c/enc/metablock.h (renamed from enc/metablock.h)0
-rw-r--r--c/enc/metablock_inc.h (renamed from enc/metablock_inc.h)0
-rw-r--r--c/enc/port.h (renamed from enc/port.h)0
-rw-r--r--c/enc/prefix.h (renamed from enc/prefix.h)0
-rwxr-xr-xc/enc/quality.h (renamed from enc/quality.h)0
-rw-r--r--c/enc/ringbuffer.h (renamed from enc/ringbuffer.h)0
-rw-r--r--c/enc/static_dict.c (renamed from enc/static_dict.c)0
-rw-r--r--c/enc/static_dict.h (renamed from enc/static_dict.h)0
-rw-r--r--c/enc/static_dict_lut.h (renamed from enc/static_dict_lut.h)0
-rw-r--r--c/enc/utf8_util.c (renamed from enc/utf8_util.c)0
-rw-r--r--c/enc/utf8_util.h (renamed from enc/utf8_util.h)0
-rw-r--r--c/enc/write_bits.h (renamed from enc/write_bits.h)0
-rw-r--r--c/fuzz/decode_fuzzer.cc (renamed from fuzz/decode_fuzzer.cc)0
-rw-r--r--c/fuzz/run_decode_fuzzer.cc (renamed from fuzz/run_decode_fuzzer.cc)0
-rwxr-xr-xc/fuzz/test_fuzzer.sh (renamed from fuzz/test_fuzzer.sh)0
-rwxr-xr-xc/include/brotli/decode.h (renamed from include/brotli/decode.h)0
-rwxr-xr-xc/include/brotli/encode.h (renamed from include/brotli/encode.h)0
-rwxr-xr-xc/include/brotli/port.h (renamed from include/brotli/port.h)0
-rwxr-xr-xc/include/brotli/types.h (renamed from include/brotli/types.h)0
-rw-r--r--c/tools/bro.c (renamed from tools/bro.c)0
-rwxr-xr-xconfigure-cmake4
-rw-r--r--premake5.lua16
-rw-r--r--scripts/.bintray.json (renamed from .bintray.json)0
-rw-r--r--scripts/.configure-custom.sh (renamed from .configure-custom.sh)0
-rwxr-xr-xscripts/.travis.sh (renamed from .travis.sh)4
-rw-r--r--scripts/appveyor.yml (renamed from appveyor.yml)7
-rw-r--r--scripts/install_py.ps1 (renamed from appveyor/install.ps1)0
-rw-r--r--scripts/run_with_compiler.cmd (renamed from appveyor/run_with_compiler.cmd)0
m---------scripts/terryfy (renamed from terryfy)0
-rw-r--r--setup.py147
-rw-r--r--tests/Makefile4
-rwxr-xr-xtests/roundtrip_test.sh6
98 files changed, 150 insertions, 152 deletions
diff --git a/.gitmodules b/.gitmodules
index e1e6cea..1e3e8a3 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,5 +1,5 @@
[submodule "terryfy"]
- path = terryfy
+ path = scripts/terryfy
url = https://github.com/MacPython/terryfy.git
[submodule "research/esaxx"]
path = research/esaxx
diff --git a/.travis.yml b/.travis.yml
index 5466c8c..0737b44 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -250,17 +250,17 @@ before_install:
###
- if [ -n "${C_COMPILER}" ]; then export CC="${C_COMPILER}"; fi
- if [ -n "${CXX_COMPILER}" ]; then export CXX="${CXX_COMPILER}"; fi
-- ./.travis.sh before_install
+- scripts/.travis.sh before_install
install:
-- ./.travis.sh install
+- scripts/.travis.sh install
script:
-- ./.travis.sh script
+- scripts/.travis.sh script
after_success:
-- ./.travis.sh after_success
+- scripts/.travis.sh after_success
before_deploy:
- if [ "${BUILD_SYSTEM}" = "python" ] && [ "${TRAVIS_OS_NAME}" = "osx" ]; then export WHEELS=$(ls ./dist/*.whl); fi
-- ./.travis.sh before_deploy
+- scripts/.travis.sh before_deploy
deploy:
- provider: releases
@@ -273,7 +273,7 @@ deploy:
tags: true
condition: "${BUILD_SYSTEM} = python && ${TRAVIS_OS_NAME} = osx"
- provider: bintray
- file: ".bintray.json"
+ file: "scripts/.bintray.json"
user: "eustas"
key:
secure: "Kbam/lTAdz72fZivbs6riJT+Y4PbuKP7r6t5PAWxJxAAykjwnYTRe3zF472g9HCE14KYMsdB+KSYSgg6TGJnqGC9gL9xhhGU9U/WmA+vbMWS/MSnMWpK9IRpp77pM2i2NKZD4v33JuEwKFCBJP3Vj6QQ5Qd1NKdobuXJyznhgnw="
diff --git a/BUILD b/BUILD
index bc86186..789578f 100644
--- a/BUILD
+++ b/BUILD
@@ -25,44 +25,44 @@ STRICT_C_OPTIONS = [
filegroup(
name = "public_headers",
- srcs = glob(["include/brotli/*.h"]),
+ srcs = glob(["c/include/brotli/*.h"]),
)
filegroup(
name = "common_headers",
- srcs = glob(["common/*.h"]),
+ srcs = glob(["c/common/*.h"]),
)
filegroup(
name = "common_sources",
- srcs = glob(["common/*.c"]),
+ srcs = glob(["c/common/*.c"]),
)
filegroup(
name = "dec_headers",
- srcs = glob(["dec/*.h"]),
+ srcs = glob(["c/dec/*.h"]),
)
filegroup(
name = "dec_sources",
- srcs = glob(["dec/*.c"]),
+ srcs = glob(["c/dec/*.c"]),
)
filegroup(
name = "enc_headers",
- srcs = glob(["enc/*.h"]),
+ srcs = glob(["c/enc/*.h"]),
)
filegroup(
name = "enc_sources",
- srcs = glob(["enc/*.c"]),
+ srcs = glob(["c/enc/*.c"]),
)
cc_library(
name = "brotli",
hdrs = [":public_headers"],
copts = STRICT_C_OPTIONS,
- includes = ["include"],
+ includes = ["c/include"],
)
cc_library(
@@ -92,7 +92,7 @@ cc_library(
cc_binary(
name = "bro",
- srcs = ["tools/bro.c"],
+ srcs = ["c/tools/bro.c"],
copts = STRICT_C_OPTIONS,
linkstatic = 1,
deps = [
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ca612d1..ca54890 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -73,7 +73,7 @@ function(hex_to_dec HEXADECIMAL DECIMAL)
endfunction(hex_to_dec)
# Version information
-file(STRINGS "common/version.h" _brotli_version_line REGEX "^#define BROTLI_VERSION (0x[0-9a-fA-F]+)$")
+file(STRINGS "c/common/version.h" _brotli_version_line REGEX "^#define BROTLI_VERSION (0x[0-9a-fA-F]+)$")
string(REGEX REPLACE "^#define BROTLI_VERSION 0x([0-9a-fA-F]+)$" "\\1" _brotli_version_hex "${_brotli_version_line}")
hex_to_dec("${_brotli_version_hex}" _brotli_version)
math(EXPR BROTLI_VERSION_MAJOR "${_brotli_version} >> 24")
@@ -112,7 +112,7 @@ if(NOT LOG2_RES)
endif()
unset(LOG2_RES)
-set(BROTLI_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/include")
+set(BROTLI_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/c/include")
set(BROTLI_LIBRARIES_CORE brotlienc brotlidec brotlicommon)
set(BROTLI_LIBRARIES ${BROTLI_LIBRARIES_CORE} ${LIBM_LIBRARY})
mark_as_advanced(BROTLI_INCLUDE_DIRS BROTLI_LIBRARIES)
@@ -126,30 +126,30 @@ elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
endif()
add_library(brotlicommon
- common/dictionary.c)
+ c/common/dictionary.c)
add_library(brotlidec
- dec/bit_reader.c
- dec/decode.c
- dec/huffman.c
- dec/state.c)
+ c/dec/bit_reader.c
+ c/dec/decode.c
+ c/dec/huffman.c
+ c/dec/state.c)
add_library(brotlienc
- enc/backward_references.c
- enc/backward_references_hq.c
- enc/bit_cost.c
- enc/block_splitter.c
- enc/brotli_bit_stream.c
- enc/cluster.c
- enc/compress_fragment.c
- enc/compress_fragment_two_pass.c
- enc/dictionary_hash.c
- enc/encode.c
- enc/entropy_encode.c
- enc/histogram.c
- enc/literal_cost.c
- enc/memory.c
- enc/metablock.c
- enc/static_dict.c
- enc/utf8_util.c)
+ c/enc/backward_references.c
+ c/enc/backward_references_hq.c
+ c/enc/bit_cost.c
+ c/enc/block_splitter.c
+ c/enc/brotli_bit_stream.c
+ c/enc/cluster.c
+ c/enc/compress_fragment.c
+ c/enc/compress_fragment_two_pass.c
+ c/enc/dictionary_hash.c
+ c/enc/encode.c
+ c/enc/entropy_encode.c
+ c/enc/histogram.c
+ c/enc/literal_cost.c
+ c/enc/memory.c
+ c/enc/metablock.c
+ c/enc/static_dict.c
+ c/enc/utf8_util.c)
# Older CMake versions does not understand INCLUDE_DIRECTORIES property.
include_directories(${BROTLI_INCLUDE_DIRS})
@@ -182,7 +182,7 @@ if(BROTLI_PARENT_DIRECTORY)
endif()
# Build the bro executable
-add_executable(bro tools/bro.c)
+add_executable(bro c/tools/bro.c)
target_link_libraries(bro ${BROTLI_LIBRARIES})
# Installation
@@ -229,9 +229,9 @@ if(NOT BROTLI_DISABLE_TESTS)
tests/testdata/asyoulik.txt
tests/testdata/lcet10.txt
tests/testdata/plrabn12.txt
- enc/encode.c
- common/dictionary.h
- dec/decode.c)
+ c/enc/encode.c
+ c/common/dictionary.h
+ c/dec/decode.c)
foreach(INPUT ${ROUNDTRIP_INPUTS})
get_filename_component(OUTPUT_NAME "${INPUT}" NAME)
diff --git a/MANIFEST.in b/MANIFEST.in
index edad2ed..6d4a12c 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,11 +1,11 @@
include CONTRIBUTING.md
-include common/*.c
-include common/*.h
-include dec/*.c
-include dec/*.h
-include enc/*.c
-include enc/*.h
-include include/brotli/*.h
+include c/common/*.c
+include c/common/*.h
+include c/dec/*.c
+include c/dec/*.h
+include c/enc/*.c
+include c/enc/*.h
+include c/include/brotli/*.h
include LICENSE
include MANIFEST.in
include python/bro.py
@@ -13,4 +13,4 @@ include python/brotlimodule.cc
include python/README.md
include README.md
include setup.py
-include tools/bro.c
+include c/tools/bro.c
diff --git a/Makefile b/Makefile
index 9dc5ecc..09e6818 100644
--- a/Makefile
+++ b/Makefile
@@ -1,14 +1,14 @@
OS := $(shell uname)
-LIBSOURCES = $(wildcard common/*.c) $(wildcard dec/*.c) $(wildcard enc/*.c)
-SOURCES = $(LIBSOURCES) tools/bro.c
+LIBSOURCES = $(wildcard c/common/*.c) $(wildcard c/dec/*.c) $(wildcard c/enc/*.c)
+SOURCES = $(LIBSOURCES) c/tools/bro.c
BINDIR = bin
OBJDIR = $(BINDIR)/obj
LIBOBJECTS = $(addprefix $(OBJDIR)/, $(LIBSOURCES:.c=.o))
OBJECTS = $(addprefix $(OBJDIR)/, $(SOURCES:.c=.o))
LIB_A = libbrotli.a
EXECUTABLE = bro
-DIRS = $(OBJDIR)/common $(OBJDIR)/dec $(OBJDIR)/enc \
- $(OBJDIR)/tools $(BINDIR)/tmp
+DIRS = $(OBJDIR)/c/common $(OBJDIR)/c/dec $(OBJDIR)/c/enc \
+ $(OBJDIR)/c/tools $(BINDIR)/tmp
CFLAGS += -O2
ifeq ($(os), Darwin)
CPPFLAGS += -DOS_MACOSX
@@ -38,5 +38,5 @@ clean:
.SECONDEXPANSION:
$(OBJECTS): $$(patsubst %.o,%.c,$$(patsubst $$(OBJDIR)/%,%,$$@)) | $(DIRS)
- $(CC) $(CFLAGS) $(CPPFLAGS) -Iinclude \
+ $(CC) $(CFLAGS) $(CPPFLAGS) -Ic/include \
-c $(patsubst %.o,%.c,$(patsubst $(OBJDIR)/%,%,$@)) -o $@
diff --git a/common/constants.h b/c/common/constants.h
index 7b3d6a5..7b3d6a5 100644
--- a/common/constants.h
+++ b/c/common/constants.h
diff --git a/common/dictionary.c b/c/common/dictionary.c
index 578cf8c..578cf8c 100644
--- a/common/dictionary.c
+++ b/c/common/dictionary.c
diff --git a/common/dictionary.h b/c/common/dictionary.h
index fc47c1e..fc47c1e 100644
--- a/common/dictionary.h
+++ b/c/common/dictionary.h
diff --git a/common/version.h b/c/common/version.h
index 10fe01f..10fe01f 100755
--- a/common/version.h
+++ b/c/common/version.h
diff --git a/dec/bit_reader.c b/c/dec/bit_reader.c
index 9925ba4..9925ba4 100644
--- a/dec/bit_reader.c
+++ b/c/dec/bit_reader.c
diff --git a/dec/bit_reader.h b/c/dec/bit_reader.h
index 30e6761..30e6761 100644
--- a/dec/bit_reader.h
+++ b/c/dec/bit_reader.h
diff --git a/dec/context.h b/c/dec/context.h
index 9402cbe..9402cbe 100644
--- a/dec/context.h
+++ b/c/dec/context.h
diff --git a/dec/decode.c b/c/dec/decode.c
index 8e3dc02..8e3dc02 100644
--- a/dec/decode.c
+++ b/c/dec/decode.c
diff --git a/dec/huffman.c b/c/dec/huffman.c
index 37da2a5..37da2a5 100644
--- a/dec/huffman.c
+++ b/c/dec/huffman.c
diff --git a/dec/huffman.h b/c/dec/huffman.h
index d3b4d53..d3b4d53 100644
--- a/dec/huffman.h
+++ b/c/dec/huffman.h
diff --git a/dec/port.h b/c/dec/port.h
index 6b3d735..6b3d735 100644
--- a/dec/port.h
+++ b/c/dec/port.h
diff --git a/dec/prefix.h b/c/dec/prefix.h
index aa776c7..aa776c7 100644
--- a/dec/prefix.h
+++ b/c/dec/prefix.h
diff --git a/dec/state.c b/c/dec/state.c
index 27f4129..27f4129 100644
--- a/dec/state.c
+++ b/c/dec/state.c
diff --git a/dec/state.h b/c/dec/state.h
index 5946124..5946124 100644
--- a/dec/state.h
+++ b/c/dec/state.h
diff --git a/dec/transform.h b/c/dec/transform.h
index fde3cdf..fde3cdf 100644
--- a/dec/transform.h
+++ b/c/dec/transform.h
diff --git a/enc/backward_references.c b/c/enc/backward_references.c
index 39a74c2..39a74c2 100644
--- a/enc/backward_references.c
+++ b/c/enc/backward_references.c
diff --git a/enc/backward_references.h b/c/enc/backward_references.h
index 7ad9881..7ad9881 100644
--- a/enc/backward_references.h
+++ b/c/enc/backward_references.h
diff --git a/enc/backward_references_hq.c b/c/enc/backward_references_hq.c
index 5150ae1..5150ae1 100755
--- a/enc/backward_references_hq.c
+++ b/c/enc/backward_references_hq.c
diff --git a/enc/backward_references_hq.h b/c/enc/backward_references_hq.h
index 0a768cd..0a768cd 100755
--- a/enc/backward_references_hq.h
+++ b/c/enc/backward_references_hq.h
diff --git a/enc/backward_references_inc.h b/c/enc/backward_references_inc.h
index 0479dfd..0479dfd 100644
--- a/enc/backward_references_inc.h
+++ b/c/enc/backward_references_inc.h
diff --git a/enc/bit_cost.c b/c/enc/bit_cost.c
index 01e30f6..01e30f6 100644
--- a/enc/bit_cost.c
+++ b/c/enc/bit_cost.c
diff --git a/enc/bit_cost.h b/c/enc/bit_cost.h
index e69ee04..e69ee04 100644
--- a/enc/bit_cost.h
+++ b/c/enc/bit_cost.h
diff --git a/enc/bit_cost_inc.h b/c/enc/bit_cost_inc.h
index 453c226..453c226 100644
--- a/enc/bit_cost_inc.h
+++ b/c/enc/bit_cost_inc.h
diff --git a/enc/block_encoder_inc.h b/c/enc/block_encoder_inc.h
index 2a08f90..2a08f90 100644
--- a/enc/block_encoder_inc.h
+++ b/c/enc/block_encoder_inc.h
diff --git a/enc/block_splitter.c b/c/enc/block_splitter.c
index a870885..a870885 100644
--- a/enc/block_splitter.c
+++ b/c/enc/block_splitter.c
diff --git a/enc/block_splitter.h b/c/enc/block_splitter.h
index 6abac08..6abac08 100644
--- a/enc/block_splitter.h
+++ b/c/enc/block_splitter.h
diff --git a/enc/block_splitter_inc.h b/c/enc/block_splitter_inc.h
index f932740..f932740 100644
--- a/enc/block_splitter_inc.h
+++ b/c/enc/block_splitter_inc.h
diff --git a/enc/brotli_bit_stream.c b/c/enc/brotli_bit_stream.c
index 4874695..4874695 100644
--- a/enc/brotli_bit_stream.c
+++ b/c/enc/brotli_bit_stream.c
diff --git a/enc/brotli_bit_stream.h b/c/enc/brotli_bit_stream.h
index a98f98f..a98f98f 100644
--- a/enc/brotli_bit_stream.h
+++ b/c/enc/brotli_bit_stream.h
diff --git a/enc/cluster.c b/c/enc/cluster.c
index bb66327..bb66327 100644
--- a/enc/cluster.c
+++ b/c/enc/cluster.c
diff --git a/enc/cluster.h b/c/enc/cluster.h
index be58614..be58614 100644
--- a/enc/cluster.h
+++ b/c/enc/cluster.h
diff --git a/enc/cluster_inc.h b/c/enc/cluster_inc.h
index cf279bd..cf279bd 100644
--- a/enc/cluster_inc.h
+++ b/c/enc/cluster_inc.h
diff --git a/enc/command.h b/c/enc/command.h
index 67ac981..67ac981 100644
--- a/enc/command.h
+++ b/c/enc/command.h
diff --git a/enc/compress_fragment.c b/c/enc/compress_fragment.c
index 96b590f..96b590f 100644
--- a/enc/compress_fragment.c
+++ b/c/enc/compress_fragment.c
diff --git a/enc/compress_fragment.h b/c/enc/compress_fragment.h
index d221266..d221266 100644
--- a/enc/compress_fragment.h
+++ b/c/enc/compress_fragment.h
diff --git a/enc/compress_fragment_two_pass.c b/c/enc/compress_fragment_two_pass.c
index cc549ed..cc549ed 100644
--- a/enc/compress_fragment_two_pass.c
+++ b/c/enc/compress_fragment_two_pass.c
diff --git a/enc/compress_fragment_two_pass.h b/c/enc/compress_fragment_two_pass.h
index ed91942..ed91942 100644
--- a/enc/compress_fragment_two_pass.h
+++ b/c/enc/compress_fragment_two_pass.h
diff --git a/enc/context.h b/c/enc/context.h
index 0e2e453..0e2e453 100644
--- a/enc/context.h
+++ b/c/enc/context.h
diff --git a/enc/dictionary_hash.c b/c/enc/dictionary_hash.c
index 4018784..4018784 100755
--- a/enc/dictionary_hash.c
+++ b/c/enc/dictionary_hash.c
diff --git a/enc/dictionary_hash.h b/c/enc/dictionary_hash.h
index b3bb959..b3bb959 100644
--- a/enc/dictionary_hash.h
+++ b/c/enc/dictionary_hash.h
diff --git a/enc/encode.c b/c/enc/encode.c
index d111573..d111573 100644
--- a/enc/encode.c
+++ b/c/enc/encode.c
diff --git a/enc/entropy_encode.c b/c/enc/entropy_encode.c
index 41ea948..41ea948 100644
--- a/enc/entropy_encode.c
+++ b/c/enc/entropy_encode.c
diff --git a/enc/entropy_encode.h b/c/enc/entropy_encode.h
index 812d009..812d009 100644
--- a/enc/entropy_encode.h
+++ b/c/enc/entropy_encode.h
diff --git a/enc/entropy_encode_static.h b/c/enc/entropy_encode_static.h
index bc0ee53..bc0ee53 100644
--- a/enc/entropy_encode_static.h
+++ b/c/enc/entropy_encode_static.h
diff --git a/enc/fast_log.h b/c/enc/fast_log.h
index 49c1af3..49c1af3 100644
--- a/enc/fast_log.h
+++ b/c/enc/fast_log.h
diff --git a/enc/find_match_length.h b/c/enc/find_match_length.h
index b3e3d80..b3e3d80 100644
--- a/enc/find_match_length.h
+++ b/c/enc/find_match_length.h
diff --git a/enc/hash.h b/c/enc/hash.h
index 4c94cda..4c94cda 100644
--- a/enc/hash.h
+++ b/c/enc/hash.h
diff --git a/enc/hash_forgetful_chain_inc.h b/c/enc/hash_forgetful_chain_inc.h
index a49fa6d..a49fa6d 100755
--- a/enc/hash_forgetful_chain_inc.h
+++ b/c/enc/hash_forgetful_chain_inc.h
diff --git a/enc/hash_longest_match64_inc.h b/c/enc/hash_longest_match64_inc.h
index 7d4199f..7d4199f 100755
--- a/enc/hash_longest_match64_inc.h
+++ b/c/enc/hash_longest_match64_inc.h
diff --git a/enc/hash_longest_match_inc.h b/c/enc/hash_longest_match_inc.h
index 6913c73..6913c73 100644
--- a/enc/hash_longest_match_inc.h
+++ b/c/enc/hash_longest_match_inc.h
diff --git a/enc/hash_longest_match_quickly_inc.h b/c/enc/hash_longest_match_quickly_inc.h
index ec1553e..ec1553e 100644
--- a/enc/hash_longest_match_quickly_inc.h
+++ b/c/enc/hash_longest_match_quickly_inc.h
diff --git a/enc/hash_to_binary_tree_inc.h b/c/enc/hash_to_binary_tree_inc.h
index 0b2554c..0b2554c 100755
--- a/enc/hash_to_binary_tree_inc.h
+++ b/c/enc/hash_to_binary_tree_inc.h
diff --git a/enc/histogram.c b/c/enc/histogram.c
index bb7b4c5..bb7b4c5 100644
--- a/enc/histogram.c
+++ b/c/enc/histogram.c
diff --git a/enc/histogram.h b/c/enc/histogram.h
index 2161574..2161574 100644
--- a/enc/histogram.h
+++ b/c/enc/histogram.h
diff --git a/enc/histogram_inc.h b/c/enc/histogram_inc.h
index 7807036..7807036 100644
--- a/enc/histogram_inc.h
+++ b/c/enc/histogram_inc.h
diff --git a/enc/literal_cost.c b/c/enc/literal_cost.c
index 91c691c..91c691c 100644
--- a/enc/literal_cost.c
+++ b/c/enc/literal_cost.c
diff --git a/enc/literal_cost.h b/c/enc/literal_cost.h
index 7b3d030..7b3d030 100644
--- a/enc/literal_cost.h
+++ b/c/enc/literal_cost.h
diff --git a/enc/memory.c b/c/enc/memory.c
index 5aa5a22..5aa5a22 100644
--- a/enc/memory.c
+++ b/c/enc/memory.c
diff --git a/enc/memory.h b/c/enc/memory.h
index f68c035..f68c035 100644
--- a/enc/memory.h
+++ b/c/enc/memory.h
diff --git a/enc/metablock.c b/c/enc/metablock.c
index 1db76da..1db76da 100644
--- a/enc/metablock.c
+++ b/c/enc/metablock.c
diff --git a/enc/metablock.h b/c/enc/metablock.h
index cc52399..cc52399 100644
--- a/enc/metablock.h
+++ b/c/enc/metablock.h
diff --git a/enc/metablock_inc.h b/c/enc/metablock_inc.h
index c8bfb81..c8bfb81 100644
--- a/enc/metablock_inc.h
+++ b/c/enc/metablock_inc.h
diff --git a/enc/port.h b/c/enc/port.h
index 0d5f24c..0d5f24c 100644
--- a/enc/port.h
+++ b/c/enc/port.h
diff --git a/enc/prefix.h b/c/enc/prefix.h
index e279ffe..e279ffe 100644
--- a/enc/prefix.h
+++ b/c/enc/prefix.h
diff --git a/enc/quality.h b/c/enc/quality.h
index 09a5fdc..09a5fdc 100755
--- a/enc/quality.h
+++ b/c/enc/quality.h
diff --git a/enc/ringbuffer.h b/c/enc/ringbuffer.h
index 0e7ef97..0e7ef97 100644
--- a/enc/ringbuffer.h
+++ b/c/enc/ringbuffer.h
diff --git a/enc/static_dict.c b/c/enc/static_dict.c
index b98ee8b..b98ee8b 100644
--- a/enc/static_dict.c
+++ b/c/enc/static_dict.c
diff --git a/enc/static_dict.h b/c/enc/static_dict.h
index fb74b13..fb74b13 100644
--- a/enc/static_dict.h
+++ b/c/enc/static_dict.h
diff --git a/enc/static_dict_lut.h b/c/enc/static_dict_lut.h
index ba94f76..ba94f76 100644
--- a/enc/static_dict_lut.h
+++ b/c/enc/static_dict_lut.h
diff --git a/enc/utf8_util.c b/c/enc/utf8_util.c
index a334927..a334927 100644
--- a/enc/utf8_util.c
+++ b/c/enc/utf8_util.c
diff --git a/enc/utf8_util.h b/c/enc/utf8_util.h
index 2ede131..2ede131 100644
--- a/enc/utf8_util.h
+++ b/c/enc/utf8_util.h
diff --git a/enc/write_bits.h b/c/enc/write_bits.h
index 3999c91..3999c91 100644
--- a/enc/write_bits.h
+++ b/c/enc/write_bits.h
diff --git a/fuzz/decode_fuzzer.cc b/c/fuzz/decode_fuzzer.cc
index 60c6f8e..60c6f8e 100644
--- a/fuzz/decode_fuzzer.cc
+++ b/c/fuzz/decode_fuzzer.cc
diff --git a/fuzz/run_decode_fuzzer.cc b/c/fuzz/run_decode_fuzzer.cc
index 8fd4189..8fd4189 100644
--- a/fuzz/run_decode_fuzzer.cc
+++ b/c/fuzz/run_decode_fuzzer.cc
diff --git a/fuzz/test_fuzzer.sh b/c/fuzz/test_fuzzer.sh
index 8266fde..8266fde 100755
--- a/fuzz/test_fuzzer.sh
+++ b/c/fuzz/test_fuzzer.sh
diff --git a/include/brotli/decode.h b/c/include/brotli/decode.h
index c97fa1d..c97fa1d 100755
--- a/include/brotli/decode.h
+++ b/c/include/brotli/decode.h
diff --git a/include/brotli/encode.h b/c/include/brotli/encode.h
index 98a5ff8..98a5ff8 100755
--- a/include/brotli/encode.h
+++ b/c/include/brotli/encode.h
diff --git a/include/brotli/port.h b/c/include/brotli/port.h
index 16c31d4..16c31d4 100755
--- a/include/brotli/port.h
+++ b/c/include/brotli/port.h
diff --git a/include/brotli/types.h b/c/include/brotli/types.h
index fcb2710..fcb2710 100755
--- a/include/brotli/types.h
+++ b/c/include/brotli/types.h
diff --git a/tools/bro.c b/c/tools/bro.c
index 07cef95..07cef95 100644
--- a/tools/bro.c
+++ b/c/tools/bro.c
diff --git a/configure-cmake b/configure-cmake
index 9f32456..6dfb92c 100755
--- a/configure-cmake
+++ b/configure-cmake
@@ -32,8 +32,8 @@ PREFIX=/usr/local
LIBDIR=
CMAKE_ARGS=
-if [ -e "${TOP_SRCDIR}/.configure-custom.sh" ]; then
- . "${TOP_SRCDIR}/.configure-custom.sh"
+if [ -e "${TOP_SRCDIR}/scripts/.configure-custom.sh" ]; then
+ . "${TOP_SRCDIR}/scripts/.configure-custom.sh"
fi
quote() {
diff --git a/premake5.lua b/premake5.lua
index 68217d7..63fa5de 100644
--- a/premake5.lua
+++ b/premake5.lua
@@ -4,7 +4,7 @@ configurations { "Release", "Debug" }
targetdir "bin"
location "buildfiles"
flags "RelativeLinks"
-includedirs { "include" }
+includedirs { "c/include" }
filter "configurations:Release"
optimize "Speed"
@@ -29,43 +29,43 @@ configuration { "macosx" }
project "brotlicommon"
kind "SharedLib"
language "C"
- files { "common/**.h", "common/**.c" }
+ files { "c/common/**.h", "c/common/**.c" }
project "brotlicommon_static"
kind "StaticLib"
targetname "brotlicommon"
language "C"
- files { "common/**.h", "common/**.c" }
+ files { "c/common/**.h", "c/common/**.c" }
project "brotlidec"
kind "SharedLib"
language "C"
- files { "dec/**.h", "dec/**.c" }
+ files { "c/dec/**.h", "c/dec/**.c" }
links "brotlicommon"
project "brotlidec_static"
kind "StaticLib"
targetname "brotlidec"
language "C"
- files { "dec/**.h", "dec/**.c" }
+ files { "c/dec/**.h", "c/dec/**.c" }
links "brotlicommon_static"
project "brotlienc"
kind "SharedLib"
language "C"
- files { "enc/**.h", "enc/**.c" }
+ files { "c/enc/**.h", "c/enc/**.c" }
links "brotlicommon"
project "brotlienc_static"
kind "StaticLib"
targetname "brotlienc"
language "C"
- files { "enc/**.h", "enc/**.c" }
+ files { "c/enc/**.h", "c/enc/**.c" }
links "brotlicommon_static"
project "bro"
kind "ConsoleApp"
language "C"
linkoptions "-static"
- files { "tools/bro.c" }
+ files { "c/tools/bro.c" }
links { "brotlicommon_static", "brotlidec_static", "brotlienc_static" }
diff --git a/.bintray.json b/scripts/.bintray.json
index ef2ea9d..ef2ea9d 100644
--- a/.bintray.json
+++ b/scripts/.bintray.json
diff --git a/.configure-custom.sh b/scripts/.configure-custom.sh
index 538122c..538122c 100644
--- a/.configure-custom.sh
+++ b/scripts/.configure-custom.sh
diff --git a/.travis.sh b/scripts/.travis.sh
index d84d105..458dcdc 100755
--- a/.travis.sh
+++ b/scripts/.travis.sh
@@ -28,7 +28,7 @@ case "$1" in
case "${BUILD_SYSTEM}" in
"python")
- source terryfy/travis_tools.sh
+ source scripts/terryfy/travis_tools.sh
get_python_environment $INSTALL_TYPE $PYTHON_VERSION venv
pip install --upgrade wheel
;;
@@ -91,7 +91,7 @@ case "$1" in
case "${BUILD_SYSTEM}" in
"bazel")
export RELEASE_DATE=`date +%Y-%m-%d`
- perl -p -i -e 's/\$\{([^}]+)\}/defined $ENV{$1} ? $ENV{$1} : $&/eg' .bintray.json
+ perl -p -i -e 's/\$\{([^}]+)\}/defined $ENV{$1} ? $ENV{$1} : $&/eg' scripts/.bintray.json
zip -j9 brotli.zip bazel-bin/libbrotli*.a bazel-bin/libbrotli*.so bazel-bin/bro
;;
esac
diff --git a/appveyor.yml b/scripts/appveyor.yml
index 01f2789..617f324 100644
--- a/appveyor.yml
+++ b/scripts/appveyor.yml
@@ -4,7 +4,7 @@ environment:
# SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
# /E:ON and /V:ON options are not enabled in the batch script intepreter
# See: http://stackoverflow.com/a/13751649/163740
- WITH_COMPILER: "cmd /E:ON /V:ON /C .\\appveyor\\run_with_compiler.cmd"
+ WITH_COMPILER: "cmd /E:ON /V:ON /C .\\scripts\\run_with_compiler.cmd"
matrix:
- BUILD_SYSTEM: CMake
@@ -49,14 +49,11 @@ environment:
PYTHON_VERSION: "3.5.0"
PYTHON_ARCH: "64"
-# init:
-# - "ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%"
-
install:
- ps: |
if ($env:BUILD_SYSTEM -eq "Python") {
# install Python and pip when not already installed
- if (-not(Test-Path($env:PYTHON))) { & appveyor\install.ps1 }
+ if (-not(Test-Path($env:PYTHON))) { & scripts\install_py.ps1 }
# prepend newly installed Python to the PATH
$env:Path = $env:PYTHON + ';' + $env:PYTHON + '\\Scripts;' + $env:PATH
diff --git a/appveyor/install.ps1 b/scripts/install_py.ps1
index bdd0cd3..bdd0cd3 100644
--- a/appveyor/install.ps1
+++ b/scripts/install_py.ps1
diff --git a/appveyor/run_with_compiler.cmd b/scripts/run_with_compiler.cmd
index ad125ec..ad125ec 100644
--- a/appveyor/run_with_compiler.cmd
+++ b/scripts/run_with_compiler.cmd
diff --git a/terryfy b/scripts/terryfy
-Subproject 8bb673f4410819df06920fdcfd24e18d235d84f
+Subproject 8bb673f4410819df06920fdcfd24e18d235d84f
diff --git a/setup.py b/setup.py
index ce39a47..6dd513f 100644
--- a/setup.py
+++ b/setup.py
@@ -22,7 +22,7 @@ CURR_DIR = os.path.abspath(os.path.dirname(os.path.realpath(__file__)))
def get_version():
""" Return BROTLI_VERSION string as defined in 'common/version.h' file. """
- version_file_path = os.path.join(CURR_DIR, 'common', 'version.h')
+ version_file_path = os.path.join(CURR_DIR, 'c', 'common', 'version.h')
version = 0
with open(version_file_path, 'r') as f:
for line in f:
@@ -164,82 +164,83 @@ EXT_MODULES = [
'_brotli',
sources=[
'python/_brotli.cc',
- 'common/dictionary.c',
- 'dec/bit_reader.c',
- 'dec/decode.c',
- 'dec/huffman.c',
- 'dec/state.c',
- 'enc/backward_references.c',
- 'enc/backward_references_hq.c',
- 'enc/bit_cost.c',
- 'enc/block_splitter.c',
- 'enc/brotli_bit_stream.c',
- 'enc/cluster.c',
- 'enc/compress_fragment.c',
- 'enc/compress_fragment_two_pass.c',
- 'enc/dictionary_hash.c',
- 'enc/encode.c',
- 'enc/entropy_encode.c',
- 'enc/histogram.c',
- 'enc/literal_cost.c',
- 'enc/memory.c',
- 'enc/metablock.c',
- 'enc/static_dict.c',
- 'enc/utf8_util.c',
+ 'c/common/dictionary.c',
+ 'c/dec/bit_reader.c',
+ 'c/dec/decode.c',
+ 'c/dec/huffman.c',
+ 'c/dec/state.c',
+ 'c/enc/backward_references.c',
+ 'c/enc/backward_references_hq.c',
+ 'c/enc/bit_cost.c',
+ 'c/enc/block_splitter.c',
+ 'c/enc/brotli_bit_stream.c',
+ 'c/enc/cluster.c',
+ 'c/enc/compress_fragment.c',
+ 'c/enc/compress_fragment_two_pass.c',
+ 'c/enc/dictionary_hash.c',
+ 'c/enc/encode.c',
+ 'c/enc/entropy_encode.c',
+ 'c/enc/histogram.c',
+ 'c/enc/literal_cost.c',
+ 'c/enc/memory.c',
+ 'c/enc/metablock.c',
+ 'c/enc/static_dict.c',
+ 'c/enc/utf8_util.c',
],
depends=[
- 'common/constants.h',
- 'common/dictionary.h',
- 'common/port.h',
- 'common/version.h',
- 'dec/bit_reader.h',
- 'dec/context.h',
- 'dec/huffman.h',
- 'dec/port.h',
- 'dec/prefix.h',
- 'dec/state.h',
- 'dec/streams.h',
- 'dec/transform.h',
- 'enc/backward_references.h',
- 'enc/backward_references_hq.h',
- 'enc/backward_references_inc.h',
- 'enc/bit_cost.h',
- 'enc/bit_cost_inc.h',
- 'enc/block_splitter.h',
- 'enc/block_splitter_inc.h',
- 'enc/brotli_bit_stream.h',
- 'enc/cluster.h',
- 'enc/cluster_inc.h',
- 'enc/command.h',
- 'enc/compress_fragment.h',
- 'enc/compress_fragment_two_pass.h'
- 'enc/context.h',
- 'enc/dictionary_hash.h',
- 'enc/entropy_encode.h',
- 'enc/entropy_encode_static.h',
- 'enc/fast_log.h',
- 'enc/find_match_length.h',
- 'enc/hash.h',
- 'enc/hash_to_binary_tree_inc.h',
- 'enc/hash_longest_match64_inc.h',
- 'enc/hash_longest_match_inc.h',
- 'enc/hash_longest_match_quickly_inc.h',
- 'enc/histogram.h',
- 'enc/histogram_inc.h',
- 'enc/literal_cost.h',
- 'enc/memory.h',
- 'enc/metablock.h',
- 'enc/metablock_inc.h',
- 'enc/port.h',
- 'enc/prefix.h',
- 'enc/ringbuffer.h',
- 'enc/static_dict.h',
- 'enc/static_dict_lut.h',
- 'enc/utf8_util.h',
- 'enc/write_bits.h',
+ 'c/common/constants.h',
+ 'c/common/dictionary.h',
+ 'c/common/version.h',
+ 'c/dec/bit_reader.h',
+ 'c/dec/context.h',
+ 'c/dec/huffman.h',
+ 'c/dec/port.h',
+ 'c/dec/prefix.h',
+ 'c/dec/state.h',
+ 'c/dec/transform.h',
+ 'c/enc/backward_references.h',
+ 'c/enc/backward_references_hq.h',
+ 'c/enc/backward_references_inc.h',
+ 'c/enc/bit_cost.h',
+ 'c/enc/bit_cost_inc.h',
+ 'c/enc/block_encoder_inc.h',
+ 'c/enc/block_splitter.h',
+ 'c/enc/block_splitter_inc.h',
+ 'c/enc/brotli_bit_stream.h',
+ 'c/enc/cluster.h',
+ 'c/enc/cluster_inc.h',
+ 'c/enc/command.h',
+ 'c/enc/compress_fragment.h',
+ 'c/enc/compress_fragment_two_pass.h'
+ 'c/enc/context.h',
+ 'c/enc/dictionary_hash.h',
+ 'c/enc/entropy_encode.h',
+ 'c/enc/entropy_encode_static.h',
+ 'c/enc/fast_log.h',
+ 'c/enc/find_match_length.h',
+ 'c/enc/hash.h',
+ 'c/enc/hash_forgetful_chain_inc.h',
+ 'c/enc/hash_longest_match64_inc.h',
+ 'c/enc/hash_longest_match_inc.h',
+ 'c/enc/hash_longest_match_quickly_inc.h',
+ 'c/enc/hash_to_binary_tree_inc.h',
+ 'c/enc/histogram.h',
+ 'c/enc/histogram_inc.h',
+ 'c/enc/literal_cost.h',
+ 'c/enc/memory.h',
+ 'c/enc/metablock.h',
+ 'c/enc/metablock_inc.h',
+ 'c/enc/port.h',
+ 'c/enc/prefix.h',
+ 'c/enc/quality.h',
+ 'c/enc/ringbuffer.h',
+ 'c/enc/static_dict.h',
+ 'c/enc/static_dict_lut.h',
+ 'c/enc/utf8_util.h',
+ 'c/enc/write_bits.h',
],
include_dirs=[
- 'include',
+ 'c/include',
],
language='c++'),
]
diff --git a/tests/Makefile b/tests/Makefile
index 7962cbd..5d847e5 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -13,5 +13,5 @@ deps :
clean :
rm -f testdata/*.{bro,unbro,uncompressed}
- rm -f $(BROTLI)/{enc,dec,tools}/*.{un,}bro
- $(MAKE) -C $(BROTLI)/tools clean
+ rm -f $(BROTLI)/c/{enc,dec,tools}/*.{un,}bro
+ $(MAKE) -C $(BROTLI)/c/tools clean
diff --git a/tests/roundtrip_test.sh b/tests/roundtrip_test.sh
index 6bdfa59..6a00a26 100755
--- a/tests/roundtrip_test.sh
+++ b/tests/roundtrip_test.sh
@@ -11,9 +11,9 @@ tests/testdata/alice29.txt
tests/testdata/asyoulik.txt
tests/testdata/lcet10.txt
tests/testdata/plrabn12.txt
-enc/encode.c
-common/dictionary.h
-dec/decode.c
+c/enc/encode.c
+c/common/dictionary.h
+c/dec/decode.c
$BRO
"""