snappy 0.0.13 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +28 -1
- data/Gemfile +6 -1
- data/README.md +28 -4
- data/Rakefile +1 -0
- data/ext/extconf.rb +21 -24
- data/lib/snappy.rb +3 -1
- data/lib/snappy/hadoop.rb +22 -0
- data/lib/snappy/hadoop/reader.rb +58 -0
- data/lib/snappy/hadoop/writer.rb +51 -0
- data/lib/snappy/reader.rb +11 -7
- data/lib/snappy/shim.rb +30 -0
- data/lib/snappy/version.rb +3 -1
- data/lib/snappy/writer.rb +8 -9
- data/smoke.sh +8 -0
- data/snappy.gemspec +6 -30
- data/test/hadoop/test-snappy-hadoop-reader.rb +103 -0
- data/test/hadoop/test-snappy-hadoop-writer.rb +48 -0
- data/test/test-snappy-hadoop.rb +22 -0
- data/vendor/snappy/AUTHORS +1 -0
- data/vendor/snappy/CMakeLists.txt +174 -0
- data/vendor/snappy/CONTRIBUTING.md +26 -0
- data/vendor/snappy/COPYING +54 -0
- data/vendor/snappy/NEWS +180 -0
- data/vendor/snappy/README.md +149 -0
- data/vendor/snappy/cmake/SnappyConfig.cmake +1 -0
- data/vendor/snappy/cmake/config.h.in +62 -0
- data/vendor/snappy/format_description.txt +110 -0
- data/vendor/snappy/framing_format.txt +135 -0
- data/vendor/snappy/snappy-c.cc +90 -0
- data/vendor/snappy/snappy-c.h +138 -0
- data/vendor/snappy/snappy-internal.h +224 -0
- data/vendor/snappy/snappy-sinksource.cc +104 -0
- data/vendor/snappy/snappy-sinksource.h +182 -0
- data/vendor/snappy/snappy-stubs-internal.cc +42 -0
- data/vendor/snappy/snappy-stubs-internal.h +561 -0
- data/vendor/snappy/snappy-stubs-public.h.in +94 -0
- data/vendor/snappy/snappy-test.cc +612 -0
- data/vendor/snappy/snappy-test.h +573 -0
- data/vendor/snappy/snappy.cc +1515 -0
- data/vendor/snappy/snappy.h +203 -0
- data/vendor/snappy/snappy_unittest.cc +1410 -0
- metadata +38 -46
data/smoke.sh
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
gem list | grep snappy && gem uninstall --force snappy
|
3
|
+
bundle exec rake clean build
|
4
|
+
gem install --no-document "$(ls pkg/snappy-*.gem)"
|
5
|
+
cat <<EOF | ruby
|
6
|
+
require 'snappy'
|
7
|
+
abort if Snappy.inflate(Snappy.deflate(File.read('smoke.sh'))) != File.read('smoke.sh')
|
8
|
+
EOF
|
data/snappy.gemspec
CHANGED
@@ -13,9 +13,13 @@ Gem::Specification.new do |spec|
|
|
13
13
|
spec.homepage = "http://github.com/miyucy/snappy"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
|
-
spec.
|
16
|
+
spec.test_files = `git ls-files -z -- test`.split("\x0")
|
17
|
+
spec.files = `git ls-files -z`.split("\x0")
|
18
|
+
spec.files -= spec.test_files
|
19
|
+
spec.files -= ['vendor/snappy']
|
20
|
+
spec.files += Dir['vendor/snappy/**/*'].reject { |e| e.start_with? 'vendor/snappy/testdata' }
|
21
|
+
|
17
22
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
-
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
23
|
spec.require_paths = ["lib"]
|
20
24
|
|
21
25
|
if defined?(JRUBY_VERSION)
|
@@ -25,32 +29,4 @@ Gem::Specification.new do |spec|
|
|
25
29
|
else
|
26
30
|
spec.extensions = ["ext/extconf.rb"]
|
27
31
|
end
|
28
|
-
|
29
|
-
spec.add_development_dependency "bundler", "~> 1.3"
|
30
|
-
spec.add_development_dependency "rake"
|
31
|
-
spec.add_development_dependency "minitest"
|
32
|
-
|
33
|
-
# get an array of submodule dirs by executing 'pwd' inside each submodule
|
34
|
-
`git submodule --quiet foreach pwd`.split($\).each do |submodule_path|
|
35
|
-
# for each submodule, change working directory to that submodule
|
36
|
-
Dir.chdir(submodule_path) do
|
37
|
-
|
38
|
-
# issue git ls-files in submodule's directory
|
39
|
-
submodule_files = `git ls-files`.split($\)
|
40
|
-
|
41
|
-
# prepend the submodule path to create absolute file paths
|
42
|
-
submodule_files_fullpaths = submodule_files.map do |filename|
|
43
|
-
"#{submodule_path}/#{filename}"
|
44
|
-
end
|
45
|
-
|
46
|
-
# remove leading path parts to get paths relative to the gem's root dir
|
47
|
-
# (this assumes, that the gemspec resides in the gem's root dir)
|
48
|
-
submodule_files_paths = submodule_files_fullpaths.map do |filename|
|
49
|
-
filename.gsub "#{File.dirname(__FILE__)}/", ""
|
50
|
-
end
|
51
|
-
|
52
|
-
# add relative paths to gem.files
|
53
|
-
spec.files += submodule_files_paths
|
54
|
-
end
|
55
|
-
end
|
56
32
|
end
|
@@ -0,0 +1,103 @@
|
|
1
|
+
require "minitest/autorun"
|
2
|
+
require "minitest/spec"
|
3
|
+
require "snappy"
|
4
|
+
require "stringio"
|
5
|
+
|
6
|
+
describe Snappy::Hadoop::Reader do
|
7
|
+
before do
|
8
|
+
@buffer = StringIO.new
|
9
|
+
Snappy::Hadoop::Writer.new @buffer do |w|
|
10
|
+
w << "foo"
|
11
|
+
w << "bar"
|
12
|
+
w << "baz"
|
13
|
+
w << "quux"
|
14
|
+
end
|
15
|
+
@buffer.rewind
|
16
|
+
end
|
17
|
+
|
18
|
+
subject do
|
19
|
+
Snappy::Hadoop::Reader.new @buffer
|
20
|
+
end
|
21
|
+
|
22
|
+
describe :initialize do
|
23
|
+
it "should yield itself to the block" do
|
24
|
+
yielded = nil
|
25
|
+
returned = Snappy::Hadoop::Reader.new @buffer do |r|
|
26
|
+
yielded = r
|
27
|
+
end
|
28
|
+
returned.must_equal yielded
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
describe :io do
|
33
|
+
it "should be a constructor argument" do
|
34
|
+
subject.io.must_equal @buffer
|
35
|
+
end
|
36
|
+
|
37
|
+
it "should not receive `length' in initializing" do
|
38
|
+
length = MiniTest::Mock.new.expect(:call, 0)
|
39
|
+
@buffer.stub(:length, length) do
|
40
|
+
Snappy::Hadoop::Reader.new @buffer
|
41
|
+
end
|
42
|
+
-> { length.verify }.must_raise MockExpectationError
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
describe :each do
|
47
|
+
before do
|
48
|
+
Snappy::Hadoop::Writer.new @buffer do |w|
|
49
|
+
w << "foo"
|
50
|
+
w << "bar"
|
51
|
+
w.dump!
|
52
|
+
w << "baz"
|
53
|
+
w << "quux"
|
54
|
+
end
|
55
|
+
@buffer.rewind
|
56
|
+
end
|
57
|
+
|
58
|
+
it "should yield each chunk" do
|
59
|
+
chunks = []
|
60
|
+
Snappy::Hadoop::Reader.new(@buffer).each do |chunk|
|
61
|
+
chunks << chunk
|
62
|
+
end
|
63
|
+
chunks.must_equal ["foobar", "bazquux"]
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
describe :read do
|
68
|
+
before do
|
69
|
+
Snappy::Hadoop::Writer.new @buffer do |w|
|
70
|
+
w << "foo"
|
71
|
+
w << "bar"
|
72
|
+
w << "baz"
|
73
|
+
w << "quux"
|
74
|
+
end
|
75
|
+
@buffer.rewind
|
76
|
+
end
|
77
|
+
|
78
|
+
it "should return the bytes" do
|
79
|
+
Snappy::Hadoop::Reader.new(@buffer).read.must_equal "foobarbazquux"
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
describe :each_line do
|
84
|
+
before do
|
85
|
+
Snappy::Hadoop::Writer.new @buffer do |w|
|
86
|
+
w << "foo\n"
|
87
|
+
w << "bar"
|
88
|
+
w.dump!
|
89
|
+
w << "baz\n"
|
90
|
+
w << "quux\n"
|
91
|
+
end
|
92
|
+
@buffer.rewind
|
93
|
+
end
|
94
|
+
|
95
|
+
it "should yield each line" do
|
96
|
+
lines = []
|
97
|
+
Snappy::Hadoop::Reader.new(@buffer).each_line do |line|
|
98
|
+
lines << line
|
99
|
+
end
|
100
|
+
lines.must_equal ["foo", "barbaz", "quux"]
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
require "minitest/autorun"
|
2
|
+
require "minitest/spec"
|
3
|
+
require "snappy"
|
4
|
+
require "stringio"
|
5
|
+
|
6
|
+
describe Snappy::Hadoop::Writer do
|
7
|
+
before do
|
8
|
+
@buffer = StringIO.new
|
9
|
+
end
|
10
|
+
|
11
|
+
subject do
|
12
|
+
Snappy::Hadoop::Writer.new @buffer
|
13
|
+
end
|
14
|
+
|
15
|
+
describe :initialize do
|
16
|
+
it "should yield itself to the block" do
|
17
|
+
yielded = nil
|
18
|
+
returned = Snappy::Hadoop::Writer.new @buffer do |w|
|
19
|
+
yielded = w
|
20
|
+
end
|
21
|
+
returned.must_equal yielded
|
22
|
+
end
|
23
|
+
|
24
|
+
it "should dump on the end of yield" do
|
25
|
+
Snappy::Hadoop::Writer.new @buffer do |w|
|
26
|
+
w << "foo"
|
27
|
+
end
|
28
|
+
@buffer.string.must_equal "\u0000\u0000\u0000\u0003\u0000\u0000\u0000\u0005\u0003\bfoo"
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
describe :io do
|
33
|
+
it "should be a constructor argument" do
|
34
|
+
io = StringIO.new
|
35
|
+
Snappy::Hadoop::Writer.new(io).io.must_equal io
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
describe :block_size do
|
40
|
+
it "should default to DEFAULT_BLOCK_SIZE" do
|
41
|
+
Snappy::Hadoop::Writer.new(StringIO.new).block_size.must_equal Snappy::Hadoop::Writer::DEFAULT_BLOCK_SIZE
|
42
|
+
end
|
43
|
+
|
44
|
+
it "should be settable via the constructor" do
|
45
|
+
Snappy::Hadoop::Writer.new(StringIO.new, 42).block_size.must_equal 42
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'minitest/autorun'
|
2
|
+
require 'minitest/spec'
|
3
|
+
require 'snappy'
|
4
|
+
|
5
|
+
describe Snappy::Hadoop do
|
6
|
+
T = [*'a'..'z', *'A'..'Z', *'0'..'9']
|
7
|
+
|
8
|
+
it 'well done' do
|
9
|
+
s = Array.new(1024){T.sample}.join
|
10
|
+
Snappy::Hadoop.inflate(Snappy::Hadoop.deflate s).must_equal(s)
|
11
|
+
end
|
12
|
+
|
13
|
+
it 'well done (pair)' do
|
14
|
+
s = Array.new(1024){T.sample}.join
|
15
|
+
[
|
16
|
+
[:deflate, :inflate],
|
17
|
+
].each do |(i, o)|
|
18
|
+
Snappy::Hadoop.__send__(o, (Snappy::Hadoop.__send__ i, s)).must_equal(s)
|
19
|
+
eval %{Snappy::Hadoop.#{o}(Snappy::Hadoop.#{i} s).must_equal(s)}
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
opensource@google.com
|
@@ -0,0 +1,174 @@
|
|
1
|
+
cmake_minimum_required(VERSION 3.1)
|
2
|
+
project(Snappy VERSION 1.1.7 LANGUAGES C CXX)
|
3
|
+
|
4
|
+
# BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to make
|
5
|
+
# it prominent in the GUI.
|
6
|
+
option(BUILD_SHARED_LIBS "Build shared libraries(DLLs)." OFF)
|
7
|
+
|
8
|
+
option(SNAPPY_BUILD_TESTS "Build Snappy's own tests." ON)
|
9
|
+
|
10
|
+
include(TestBigEndian)
|
11
|
+
test_big_endian(SNAPPY_IS_BIG_ENDIAN)
|
12
|
+
|
13
|
+
include(CheckIncludeFile)
|
14
|
+
check_include_file("byteswap.h" HAVE_BYTESWAP_H)
|
15
|
+
check_include_file("stddef.h" HAVE_STDDEF_H)
|
16
|
+
check_include_file("stdint.h" HAVE_STDINT_H)
|
17
|
+
check_include_file("sys/endian.h" HAVE_SYS_ENDIAN_H)
|
18
|
+
check_include_file("sys/mman.h" HAVE_SYS_MMAN_H)
|
19
|
+
check_include_file("sys/resource.h" HAVE_SYS_RESOURCE_H)
|
20
|
+
check_include_file("sys/time.h" HAVE_SYS_TIME_H)
|
21
|
+
check_include_file("sys/uio.h" HAVE_SYS_UIO_H)
|
22
|
+
check_include_file("unistd.h" HAVE_UNISTD_H)
|
23
|
+
check_include_file("windows.h" HAVE_WINDOWS_H)
|
24
|
+
|
25
|
+
include(CheckLibraryExists)
|
26
|
+
check_library_exists(z zlibVersion "" HAVE_LIBZ)
|
27
|
+
check_library_exists(lzo2 lzo1x_1_15_compress "" HAVE_LIBLZO2)
|
28
|
+
|
29
|
+
include(CheckCXXSourceCompiles)
|
30
|
+
check_cxx_source_compiles(
|
31
|
+
"int main(void) { return __builtin_expect(0, 1); }" HAVE_BUILTIN_EXPECT)
|
32
|
+
|
33
|
+
check_cxx_source_compiles(
|
34
|
+
"int main(void) { return __builtin_ctzll(0); }" HAVE_BUILTIN_CTZ)
|
35
|
+
|
36
|
+
include(CheckSymbolExists)
|
37
|
+
check_symbol_exists("mmap" "sys/mman.h" HAVE_FUNC_MMAP)
|
38
|
+
check_symbol_exists("sysconf" "unistd.h" HAVE_FUNC_SYSCONF)
|
39
|
+
|
40
|
+
find_package(GTest QUIET)
|
41
|
+
if(GTEST_FOUND)
|
42
|
+
set(HAVE_GTEST 1)
|
43
|
+
endif(GTEST_FOUND)
|
44
|
+
|
45
|
+
find_package(Gflags QUIET)
|
46
|
+
if(GFLAGS_FOUND)
|
47
|
+
set(HAVE_GFLAGS 1)
|
48
|
+
endif(GFLAGS_FOUND)
|
49
|
+
|
50
|
+
configure_file(
|
51
|
+
"${PROJECT_SOURCE_DIR}/cmake/config.h.in"
|
52
|
+
"${PROJECT_BINARY_DIR}/config.h"
|
53
|
+
)
|
54
|
+
|
55
|
+
# We don't want to define HAVE_ macros in public headers. Instead, we use
|
56
|
+
# CMake's variable substitution with 0/1 variables, which will be seen by the
|
57
|
+
# preprocessor as constants.
|
58
|
+
set(HAVE_STDINT_H_01 ${HAVE_STDINT_H})
|
59
|
+
set(HAVE_STDDEF_H_01 ${HAVE_STDDEF_H})
|
60
|
+
set(HAVE_SYS_UIO_H_01 ${HAVE_SYS_UIO_H})
|
61
|
+
if(NOT HAVE_STDINT_H_01)
|
62
|
+
set(HAVE_STDINT_H_01 0)
|
63
|
+
endif(NOT HAVE_STDINT_H_01)
|
64
|
+
if(NOT HAVE_STDDEF_H_01)
|
65
|
+
set(HAVE_STDDEF_H_01 0)
|
66
|
+
endif(NOT HAVE_STDDEF_H_01)
|
67
|
+
if(NOT HAVE_SYS_UIO_H_01)
|
68
|
+
set(HAVE_SYS_UIO_H_01 0)
|
69
|
+
endif(NOT HAVE_SYS_UIO_H_01)
|
70
|
+
|
71
|
+
configure_file(
|
72
|
+
"${PROJECT_SOURCE_DIR}/snappy-stubs-public.h.in"
|
73
|
+
"${PROJECT_BINARY_DIR}/snappy-stubs-public.h")
|
74
|
+
|
75
|
+
add_library(snappy "")
|
76
|
+
target_sources(snappy
|
77
|
+
PRIVATE
|
78
|
+
"${PROJECT_SOURCE_DIR}/snappy-internal.h"
|
79
|
+
"${PROJECT_SOURCE_DIR}/snappy-stubs-internal.h"
|
80
|
+
"${PROJECT_SOURCE_DIR}/snappy-c.cc"
|
81
|
+
"${PROJECT_SOURCE_DIR}/snappy-sinksource.cc"
|
82
|
+
"${PROJECT_SOURCE_DIR}/snappy-stubs-internal.cc"
|
83
|
+
"${PROJECT_SOURCE_DIR}/snappy.cc"
|
84
|
+
"${PROJECT_BINARY_DIR}/config.h"
|
85
|
+
|
86
|
+
# Only CMake 3.3+ supports PUBLIC sources in targets exported by "install".
|
87
|
+
$<$<VERSION_GREATER:CMAKE_VERSION,3.2>:PUBLIC>
|
88
|
+
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/snappy-c.h>
|
89
|
+
$<INSTALL_INTERFACE:include/snappy-c.h>
|
90
|
+
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/snappy-sinksource.h>
|
91
|
+
$<INSTALL_INTERFACE:include/snappy-sinksource.h>
|
92
|
+
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/snappy.h>
|
93
|
+
$<INSTALL_INTERFACE:include/snappy.h>
|
94
|
+
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/snappy-stubs-public.h>
|
95
|
+
$<INSTALL_INTERFACE:include/snappy-stubs-public.h>
|
96
|
+
)
|
97
|
+
target_include_directories(snappy
|
98
|
+
PUBLIC
|
99
|
+
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}>
|
100
|
+
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>
|
101
|
+
$<INSTALL_INTERFACE:include>
|
102
|
+
)
|
103
|
+
set_target_properties(snappy
|
104
|
+
PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
|
105
|
+
|
106
|
+
target_compile_definitions(snappy PRIVATE -DHAVE_CONFIG_H)
|
107
|
+
if(BUILD_SHARED_LIBS)
|
108
|
+
set_target_properties(snappy PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
109
|
+
endif(BUILD_SHARED_LIBS)
|
110
|
+
|
111
|
+
if(SNAPPY_BUILD_TESTS)
|
112
|
+
enable_testing()
|
113
|
+
|
114
|
+
add_executable(snappy_unittest "")
|
115
|
+
target_sources(snappy_unittest
|
116
|
+
PRIVATE
|
117
|
+
"${PROJECT_SOURCE_DIR}/snappy_unittest.cc"
|
118
|
+
"${PROJECT_SOURCE_DIR}/snappy-test.cc"
|
119
|
+
)
|
120
|
+
target_compile_definitions(snappy_unittest PRIVATE -DHAVE_CONFIG_H)
|
121
|
+
target_link_libraries(snappy_unittest snappy ${GFLAGS_LIBRARIES})
|
122
|
+
|
123
|
+
if(HAVE_LIBZ)
|
124
|
+
target_link_libraries(snappy_unittest z)
|
125
|
+
endif(HAVE_LIBZ)
|
126
|
+
if(HAVE_LIBLZO2)
|
127
|
+
target_link_libraries(snappy_unittest lzo2)
|
128
|
+
endif(HAVE_LIBLZO2)
|
129
|
+
|
130
|
+
target_include_directories(snappy_unittest
|
131
|
+
BEFORE PRIVATE
|
132
|
+
"${PROJECT_SOURCE_DIR}"
|
133
|
+
"${GTEST_INCLUDE_DIRS}"
|
134
|
+
"${GFLAGS_INCLUDE_DIRS}"
|
135
|
+
)
|
136
|
+
|
137
|
+
add_test(
|
138
|
+
NAME snappy_unittest
|
139
|
+
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
|
140
|
+
COMMAND "${PROJECT_BINARY_DIR}/snappy_unittest")
|
141
|
+
endif(SNAPPY_BUILD_TESTS)
|
142
|
+
|
143
|
+
include(GNUInstallDirs)
|
144
|
+
install(TARGETS snappy
|
145
|
+
EXPORT SnappyTargets
|
146
|
+
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
147
|
+
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
148
|
+
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
149
|
+
)
|
150
|
+
install(
|
151
|
+
FILES
|
152
|
+
"${PROJECT_SOURCE_DIR}/snappy-c.h"
|
153
|
+
"${PROJECT_SOURCE_DIR}/snappy-sinksource.h"
|
154
|
+
"${PROJECT_SOURCE_DIR}/snappy.h"
|
155
|
+
"${PROJECT_BINARY_DIR}/snappy-stubs-public.h"
|
156
|
+
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
157
|
+
)
|
158
|
+
|
159
|
+
include(CMakePackageConfigHelpers)
|
160
|
+
write_basic_package_version_file(
|
161
|
+
"${PROJECT_BINARY_DIR}/SnappyConfigVersion.cmake"
|
162
|
+
COMPATIBILITY SameMajorVersion
|
163
|
+
)
|
164
|
+
install(
|
165
|
+
EXPORT SnappyTargets
|
166
|
+
NAMESPACE Snappy::
|
167
|
+
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/Snappy"
|
168
|
+
)
|
169
|
+
install(
|
170
|
+
FILES
|
171
|
+
"${PROJECT_SOURCE_DIR}/cmake/SnappyConfig.cmake"
|
172
|
+
"${PROJECT_BINARY_DIR}/SnappyConfigVersion.cmake"
|
173
|
+
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/Snappy"
|
174
|
+
)
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# How to Contribute
|
2
|
+
|
3
|
+
We'd love to accept your patches and contributions to this project. There are
|
4
|
+
just a few small guidelines you need to follow.
|
5
|
+
|
6
|
+
## Contributor License Agreement
|
7
|
+
|
8
|
+
Contributions to this project must be accompanied by a Contributor License
|
9
|
+
Agreement. You (or your employer) retain the copyright to your contribution,
|
10
|
+
this simply gives us permission to use and redistribute your contributions as
|
11
|
+
part of the project. Head over to <https://cla.developers.google.com/> to see
|
12
|
+
your current agreements on file or to sign a new one.
|
13
|
+
|
14
|
+
You generally only need to submit a CLA once, so if you've already submitted one
|
15
|
+
(even if it was for a different project), you probably don't need to do it
|
16
|
+
again.
|
17
|
+
|
18
|
+
## Code reviews
|
19
|
+
|
20
|
+
All submissions, including submissions by project members, require review. We
|
21
|
+
use GitHub pull requests for this purpose. Consult
|
22
|
+
[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more
|
23
|
+
information on using pull requests.
|
24
|
+
|
25
|
+
Please make sure that all the automated checks (CLA, AppVeyor, Travis) pass for
|
26
|
+
your pull requests. Pull requests whose checks fail may be ignored.
|
@@ -0,0 +1,54 @@
|
|
1
|
+
Copyright 2011, Google Inc.
|
2
|
+
All rights reserved.
|
3
|
+
|
4
|
+
Redistribution and use in source and binary forms, with or without
|
5
|
+
modification, are permitted provided that the following conditions are
|
6
|
+
met:
|
7
|
+
|
8
|
+
* Redistributions of source code must retain the above copyright
|
9
|
+
notice, this list of conditions and the following disclaimer.
|
10
|
+
* Redistributions in binary form must reproduce the above
|
11
|
+
copyright notice, this list of conditions and the following disclaimer
|
12
|
+
in the documentation and/or other materials provided with the
|
13
|
+
distribution.
|
14
|
+
* Neither the name of Google Inc. nor the names of its
|
15
|
+
contributors may be used to endorse or promote products derived from
|
16
|
+
this software without specific prior written permission.
|
17
|
+
|
18
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
19
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
20
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
21
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
22
|
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
23
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
24
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
25
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
26
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
27
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
28
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
29
|
+
|
30
|
+
===
|
31
|
+
|
32
|
+
Some of the benchmark data in testdata/ is licensed differently:
|
33
|
+
|
34
|
+
- fireworks.jpeg is Copyright 2013 Steinar H. Gunderson, and
|
35
|
+
is licensed under the Creative Commons Attribution 3.0 license
|
36
|
+
(CC-BY-3.0). See https://creativecommons.org/licenses/by/3.0/
|
37
|
+
for more information.
|
38
|
+
|
39
|
+
- kppkn.gtb is taken from the Gaviota chess tablebase set, and
|
40
|
+
is licensed under the MIT License. See
|
41
|
+
https://sites.google.com/site/gaviotachessengine/Home/endgame-tablebases-1
|
42
|
+
for more information.
|
43
|
+
|
44
|
+
- paper-100k.pdf is an excerpt (bytes 92160 to 194560) from the paper
|
45
|
+
“Combinatorial Modeling of Chromatin Features Quantitatively Predicts DNA
|
46
|
+
Replication Timing in _Drosophila_” by Federico Comoglio and Renato Paro,
|
47
|
+
which is licensed under the CC-BY license. See
|
48
|
+
http://www.ploscompbiol.org/static/license for more ifnormation.
|
49
|
+
|
50
|
+
- alice29.txt, asyoulik.txt, plrabn12.txt and lcet10.txt are from Project
|
51
|
+
Gutenberg. The first three have expired copyrights and are in the public
|
52
|
+
domain; the latter does not have expired copyright, but is still in the
|
53
|
+
public domain according to the license information
|
54
|
+
(http://www.gutenberg.org/ebooks/53).
|