snappy 0.0.17 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.dockerignore +2 -0
- data/.github/workflows/main.yml +34 -0
- data/.github/workflows/publish.yml +34 -0
- data/.gitignore +2 -1
- data/.gitmodules +1 -1
- data/Dockerfile +13 -0
- data/Gemfile +4 -0
- data/README.md +29 -5
- data/Rakefile +32 -29
- data/ext/api.c +6 -1
- data/ext/extconf.rb +23 -16
- data/lib/snappy/hadoop/reader.rb +62 -0
- data/lib/snappy/hadoop/writer.rb +51 -0
- data/lib/snappy/hadoop.rb +22 -0
- data/lib/snappy/reader.rb +14 -10
- data/lib/snappy/shim.rb +1 -1
- data/lib/snappy/version.rb +1 -1
- data/lib/snappy.rb +5 -4
- data/snappy.gemspec +13 -13
- data/test/hadoop/snappy_hadoop_reader_test.rb +115 -0
- data/test/hadoop/snappy_hadoop_writer_test.rb +48 -0
- data/test/snappy_hadoop_test.rb +26 -0
- data/test/snappy_reader_test.rb +148 -0
- data/test/snappy_test.rb +95 -0
- data/test/snappy_writer_test.rb +55 -0
- data/test/test_helper.rb +7 -0
- data/test.sh +3 -0
- data/vendor/snappy/CMakeLists.txt +297 -0
- data/vendor/snappy/CONTRIBUTING.md +26 -0
- data/vendor/snappy/NEWS +40 -0
- data/vendor/snappy/{README → README.md} +27 -18
- data/vendor/snappy/cmake/SnappyConfig.cmake.in +33 -0
- data/vendor/snappy/cmake/config.h.in +62 -0
- data/vendor/snappy/docs/README.md +72 -0
- data/vendor/snappy/snappy-internal.h +22 -18
- data/vendor/snappy/snappy-stubs-internal.cc +1 -1
- data/vendor/snappy/snappy-stubs-internal.h +116 -38
- data/vendor/snappy/snappy-stubs-public.h.in +20 -46
- data/vendor/snappy/snappy-test.cc +26 -22
- data/vendor/snappy/snappy-test.h +24 -98
- data/vendor/snappy/snappy.cc +380 -183
- data/vendor/snappy/snappy.h +14 -10
- data/vendor/snappy/snappy_compress_fuzzer.cc +59 -0
- data/vendor/snappy/snappy_uncompress_fuzzer.cc +57 -0
- data/vendor/snappy/snappy_unittest.cc +236 -261
- metadata +37 -92
- data/.travis.yml +0 -26
- data/smoke.sh +0 -8
- data/test/test-snappy-reader.rb +0 -129
- data/test/test-snappy-writer.rb +0 -55
- data/test/test-snappy.rb +0 -58
- data/vendor/snappy/ChangeLog +0 -2468
- data/vendor/snappy/INSTALL +0 -370
- data/vendor/snappy/Makefile +0 -982
- data/vendor/snappy/Makefile.am +0 -26
- data/vendor/snappy/Makefile.in +0 -982
- data/vendor/snappy/aclocal.m4 +0 -9738
- data/vendor/snappy/autogen.sh +0 -12
- data/vendor/snappy/autom4te.cache/output.0 +0 -18856
- data/vendor/snappy/autom4te.cache/output.1 +0 -18852
- data/vendor/snappy/autom4te.cache/requests +0 -297
- data/vendor/snappy/autom4te.cache/traces.0 +0 -2689
- data/vendor/snappy/autom4te.cache/traces.1 +0 -714
- data/vendor/snappy/config.guess +0 -1530
- data/vendor/snappy/config.h +0 -135
- data/vendor/snappy/config.h.in +0 -134
- data/vendor/snappy/config.log +0 -1640
- data/vendor/snappy/config.status +0 -2318
- data/vendor/snappy/config.sub +0 -1773
- data/vendor/snappy/configure +0 -18852
- data/vendor/snappy/configure.ac +0 -134
- data/vendor/snappy/depcomp +0 -688
- data/vendor/snappy/install-sh +0 -527
- data/vendor/snappy/libtool +0 -10246
- data/vendor/snappy/ltmain.sh +0 -9661
- data/vendor/snappy/m4/gtest.m4 +0 -74
- data/vendor/snappy/m4/libtool.m4 +0 -8001
- data/vendor/snappy/m4/ltoptions.m4 +0 -384
- data/vendor/snappy/m4/ltsugar.m4 +0 -123
- data/vendor/snappy/m4/ltversion.m4 +0 -23
- data/vendor/snappy/m4/lt~obsolete.m4 +0 -98
- data/vendor/snappy/missing +0 -331
- data/vendor/snappy/snappy-stubs-public.h +0 -100
- data/vendor/snappy/snappy.pc +0 -10
- data/vendor/snappy/snappy.pc.in +0 -10
- data/vendor/snappy/stamp-h1 +0 -1
data/vendor/snappy/configure.ac
DELETED
@@ -1,134 +0,0 @@
|
|
1
|
-
m4_define([snappy_major], [1])
|
2
|
-
m4_define([snappy_minor], [1])
|
3
|
-
m4_define([snappy_patchlevel], [4])
|
4
|
-
|
5
|
-
# Libtool shared library interface versions (current:revision:age)
|
6
|
-
# Update this value for every release! (A:B:C will map to foo.so.(A-C).C.B)
|
7
|
-
# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
|
8
|
-
m4_define([snappy_ltversion], [4:1:3])
|
9
|
-
|
10
|
-
AC_INIT([snappy], [snappy_major.snappy_minor.snappy_patchlevel])
|
11
|
-
AC_CONFIG_MACRO_DIR([m4])
|
12
|
-
AC_CONFIG_AUX_DIR([.])
|
13
|
-
|
14
|
-
# These are flags passed to automake (though they look like gcc flags!)
|
15
|
-
AM_INIT_AUTOMAKE([-Wall])
|
16
|
-
|
17
|
-
LT_INIT
|
18
|
-
AC_SUBST([LIBTOOL_DEPS])
|
19
|
-
AC_PROG_CXX
|
20
|
-
AC_LANG([C++])
|
21
|
-
AC_C_BIGENDIAN
|
22
|
-
AC_TYPE_SIZE_T
|
23
|
-
AC_TYPE_SSIZE_T
|
24
|
-
AC_CHECK_HEADERS([stdint.h stddef.h sys/mman.h sys/resource.h windows.h byteswap.h sys/byteswap.h sys/endian.h sys/time.h])
|
25
|
-
|
26
|
-
# Don't use AC_FUNC_MMAP, as it checks for mappings of already-mapped memory,
|
27
|
-
# which we don't need (and does not exist on Windows).
|
28
|
-
AC_CHECK_FUNC([mmap])
|
29
|
-
|
30
|
-
GTEST_LIB_CHECK([], [true], [true # Ignore; we can live without it.])
|
31
|
-
|
32
|
-
AC_ARG_WITH([gflags],
|
33
|
-
[AS_HELP_STRING(
|
34
|
-
[--with-gflags],
|
35
|
-
[use Google Flags package to enhance the unit test @<:@default=check@:>@])],
|
36
|
-
[],
|
37
|
-
[with_gflags=check])
|
38
|
-
|
39
|
-
if test "x$with_gflags" != "xno"; then
|
40
|
-
PKG_CHECK_MODULES(
|
41
|
-
[gflags],
|
42
|
-
[libgflags],
|
43
|
-
[AC_DEFINE([HAVE_GFLAGS], [1], [Use the gflags package for command-line parsing.])],
|
44
|
-
[if test "x$with_gflags" != "xcheck"; then
|
45
|
-
AC_MSG_FAILURE([--with-gflags was given, but test for gflags failed])
|
46
|
-
fi])
|
47
|
-
fi
|
48
|
-
|
49
|
-
# See if we have __builtin_expect.
|
50
|
-
# TODO: Use AC_CACHE.
|
51
|
-
AC_MSG_CHECKING([if the compiler supports __builtin_expect])
|
52
|
-
|
53
|
-
AC_TRY_COMPILE(, [
|
54
|
-
return __builtin_expect(1, 1) ? 1 : 0
|
55
|
-
], [
|
56
|
-
snappy_have_builtin_expect=yes
|
57
|
-
AC_MSG_RESULT([yes])
|
58
|
-
], [
|
59
|
-
snappy_have_builtin_expect=no
|
60
|
-
AC_MSG_RESULT([no])
|
61
|
-
])
|
62
|
-
if test x$snappy_have_builtin_expect = xyes ; then
|
63
|
-
AC_DEFINE([HAVE_BUILTIN_EXPECT], [1], [Define to 1 if the compiler supports __builtin_expect.])
|
64
|
-
fi
|
65
|
-
|
66
|
-
# See if we have working count-trailing-zeros intrinsics.
|
67
|
-
# TODO: Use AC_CACHE.
|
68
|
-
AC_MSG_CHECKING([if the compiler supports __builtin_ctzll])
|
69
|
-
|
70
|
-
AC_TRY_COMPILE(, [
|
71
|
-
return (__builtin_ctzll(0x100000000LL) == 32) ? 1 : 0
|
72
|
-
], [
|
73
|
-
snappy_have_builtin_ctz=yes
|
74
|
-
AC_MSG_RESULT([yes])
|
75
|
-
], [
|
76
|
-
snappy_have_builtin_ctz=no
|
77
|
-
AC_MSG_RESULT([no])
|
78
|
-
])
|
79
|
-
if test x$snappy_have_builtin_ctz = xyes ; then
|
80
|
-
AC_DEFINE([HAVE_BUILTIN_CTZ], [1], [Define to 1 if the compiler supports __builtin_ctz and friends.])
|
81
|
-
fi
|
82
|
-
|
83
|
-
# Other compression libraries; the unit test can use these for comparison
|
84
|
-
# if they are available. If they are not found, just ignore.
|
85
|
-
UNITTEST_LIBS=""
|
86
|
-
AC_DEFUN([CHECK_EXT_COMPRESSION_LIB], [
|
87
|
-
AH_CHECK_LIB([$1])
|
88
|
-
AC_CHECK_LIB(
|
89
|
-
[$1],
|
90
|
-
[$2],
|
91
|
-
[
|
92
|
-
AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_LIB$1))
|
93
|
-
UNITTEST_LIBS="-l$1 $UNITTEST_LIBS"
|
94
|
-
],
|
95
|
-
[true]
|
96
|
-
)
|
97
|
-
])
|
98
|
-
CHECK_EXT_COMPRESSION_LIB([z], [zlibVersion])
|
99
|
-
CHECK_EXT_COMPRESSION_LIB([lzo2], [lzo1x_1_15_compress])
|
100
|
-
CHECK_EXT_COMPRESSION_LIB([lzf], [lzf_compress])
|
101
|
-
CHECK_EXT_COMPRESSION_LIB([fastlz], [fastlz_compress])
|
102
|
-
CHECK_EXT_COMPRESSION_LIB([quicklz], [qlz_compress])
|
103
|
-
AC_SUBST([UNITTEST_LIBS])
|
104
|
-
|
105
|
-
# These are used by snappy-stubs-public.h.in.
|
106
|
-
if test "$ac_cv_header_stdint_h" = "yes"; then
|
107
|
-
AC_SUBST([ac_cv_have_stdint_h], [1])
|
108
|
-
else
|
109
|
-
AC_SUBST([ac_cv_have_stdint_h], [0])
|
110
|
-
fi
|
111
|
-
if test "$ac_cv_header_stddef_h" = "yes"; then
|
112
|
-
AC_SUBST([ac_cv_have_stddef_h], [1])
|
113
|
-
else
|
114
|
-
AC_SUBST([ac_cv_have_stddef_h], [0])
|
115
|
-
fi
|
116
|
-
if test "$ac_cv_header_sys_uio_h" = "yes"; then
|
117
|
-
AC_SUBST([ac_cv_have_sys_uio_h], [1])
|
118
|
-
else
|
119
|
-
AC_SUBST([ac_cv_have_sys_uio_h], [0])
|
120
|
-
fi
|
121
|
-
|
122
|
-
# Export the version to snappy-stubs-public.h.
|
123
|
-
SNAPPY_MAJOR="snappy_major"
|
124
|
-
SNAPPY_MINOR="snappy_minor"
|
125
|
-
SNAPPY_PATCHLEVEL="snappy_patchlevel"
|
126
|
-
|
127
|
-
AC_SUBST([SNAPPY_MAJOR])
|
128
|
-
AC_SUBST([SNAPPY_MINOR])
|
129
|
-
AC_SUBST([SNAPPY_PATCHLEVEL])
|
130
|
-
AC_SUBST([SNAPPY_LTVERSION], snappy_ltversion)
|
131
|
-
|
132
|
-
AC_CONFIG_HEADERS([config.h])
|
133
|
-
AC_CONFIG_FILES([Makefile snappy-stubs-public.h snappy.pc])
|
134
|
-
AC_OUTPUT
|