snappy 0.0.12-java → 0.1.0-java
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 +14 -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/CMakeLists.txt +174 -0
- data/vendor/snappy/CONTRIBUTING.md +26 -0
- data/vendor/snappy/COPYING +1 -1
- data/vendor/snappy/NEWS +52 -0
- data/vendor/snappy/{README → README.md} +23 -9
- data/vendor/snappy/cmake/SnappyConfig.cmake +1 -0
- data/vendor/snappy/cmake/config.h.in +62 -0
- data/vendor/snappy/snappy-c.h +3 -3
- data/vendor/snappy/snappy-internal.h +101 -27
- data/vendor/snappy/snappy-sinksource.cc +33 -0
- data/vendor/snappy/snappy-sinksource.h +51 -6
- data/vendor/snappy/snappy-stubs-internal.h +107 -37
- data/vendor/snappy/snappy-stubs-public.h.in +16 -20
- data/vendor/snappy/snappy-test.cc +15 -9
- data/vendor/snappy/snappy-test.h +34 -43
- data/vendor/snappy/snappy.cc +529 -320
- data/vendor/snappy/snappy.h +23 -4
- data/vendor/snappy/snappy_unittest.cc +240 -185
- metadata +27 -74
- data/vendor/snappy/ChangeLog +0 -1916
- data/vendor/snappy/Makefile.am +0 -23
- data/vendor/snappy/autogen.sh +0 -7
- data/vendor/snappy/configure.ac +0 -133
- data/vendor/snappy/m4/gtest.m4 +0 -74
- data/vendor/snappy/testdata/alice29.txt +0 -3609
- data/vendor/snappy/testdata/asyoulik.txt +0 -4122
- data/vendor/snappy/testdata/baddata1.snappy +0 -0
- data/vendor/snappy/testdata/baddata2.snappy +0 -0
- data/vendor/snappy/testdata/baddata3.snappy +0 -0
- data/vendor/snappy/testdata/fireworks.jpeg +0 -0
- data/vendor/snappy/testdata/geo.protodata +0 -0
- data/vendor/snappy/testdata/html +0 -1
- data/vendor/snappy/testdata/html_x_4 +0 -1
- data/vendor/snappy/testdata/kppkn.gtb +0 -0
- data/vendor/snappy/testdata/lcet10.txt +0 -7519
- data/vendor/snappy/testdata/paper-100k.pdf +2 -600
- data/vendor/snappy/testdata/plrabn12.txt +0 -10699
- data/vendor/snappy/testdata/urls.10K +0 -10000
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,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.
|
data/vendor/snappy/COPYING
CHANGED
@@ -29,7 +29,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
29
29
|
|
30
30
|
===
|
31
31
|
|
32
|
-
Some of the benchmark data in
|
32
|
+
Some of the benchmark data in testdata/ is licensed differently:
|
33
33
|
|
34
34
|
- fireworks.jpeg is Copyright 2013 Steinar H. Gunderson, and
|
35
35
|
is licensed under the Creative Commons Attribution 3.0 license
|
data/vendor/snappy/NEWS
CHANGED
@@ -1,3 +1,55 @@
|
|
1
|
+
Snappy v1.1.7, August 24th 2017:
|
2
|
+
|
3
|
+
* Improved CMake build support for 64-bit Linux distributions.
|
4
|
+
|
5
|
+
* MSVC builds now use MSVC-specific intrinsics that map to clzll.
|
6
|
+
|
7
|
+
* ARM64 (AArch64) builds use the code paths optimized for 64-bit processors.
|
8
|
+
|
9
|
+
Snappy v1.1.6, July 12th 2017:
|
10
|
+
|
11
|
+
This is a re-release of v1.1.5 with proper SONAME / SOVERSION values.
|
12
|
+
|
13
|
+
Snappy v1.1.5, June 28th 2017:
|
14
|
+
|
15
|
+
This release has broken SONAME / SOVERSION values. Users of snappy as a shared
|
16
|
+
library should avoid 1.1.5 and use 1.1.6 instead. SONAME / SOVERSION errors will
|
17
|
+
manifest as the dynamic library loader complaining that it cannot find snappy's
|
18
|
+
shared library file (libsnappy.so / libsnappy.dylib), or that the library it
|
19
|
+
found does not have the required version. 1.1.6 has the same code as 1.1.5, but
|
20
|
+
carries build configuration fixes for the issues above.
|
21
|
+
|
22
|
+
* Add CMake build support. The autoconf build support is now deprecated, and
|
23
|
+
will be removed in the next release.
|
24
|
+
|
25
|
+
* Add AppVeyor configuration, for Windows CI coverage.
|
26
|
+
|
27
|
+
* Small performance improvement on little-endian PowerPC.
|
28
|
+
|
29
|
+
* Small performance improvement on LLVM with position-independent executables.
|
30
|
+
|
31
|
+
* Fix a few issues with various build environments.
|
32
|
+
|
33
|
+
Snappy v1.1.4, January 25th 2017:
|
34
|
+
|
35
|
+
* Fix a 1% performance regression when snappy is used in PIE executables.
|
36
|
+
|
37
|
+
* Improve compression performance by 5%.
|
38
|
+
|
39
|
+
* Improve decompression performance by 20%.
|
40
|
+
|
41
|
+
Snappy v1.1.3, July 6th 2015:
|
42
|
+
|
43
|
+
This is the first release to be done from GitHub, which means that
|
44
|
+
some minor things like the ChangeLog format has changed (git log
|
45
|
+
format instead of svn log).
|
46
|
+
|
47
|
+
* Add support for Uncompress() from a Source to a Sink.
|
48
|
+
|
49
|
+
* Various minor changes to improve MSVC support; in particular,
|
50
|
+
the unit tests now compile and run under MSVC.
|
51
|
+
|
52
|
+
|
1
53
|
Snappy v1.1.2, February 28th 2014:
|
2
54
|
|
3
55
|
This is a maintenance release with no changes to the actual library
|