diff options
author | Jason W. Bacon <jwb@FreeBSD.org> | 2021-08-13 00:38:32 +0000 |
---|---|---|
committer | Jason W. Bacon <jwb@FreeBSD.org> | 2021-08-13 00:38:32 +0000 |
commit | ebe45fb054f91b6c193c592ddef0ee1403ca7dd9 (patch) | |
tree | 0c8a2d4886939f8aa6c940c65ac11c87bd4122ad | |
parent | e526133353d39a3d93e096e755aebbc98f35b593 (diff) |
archivers/streamvbyte: Integer compression with SIMD based on Google's varint
StreamVByte is an integer compression technique that applies SIMD
instructions (vectorization) to Google's varint approach. The net result
is faster than other byte-oriented compression techniques.
-rw-r--r-- | archivers/Makefile | 1 | ||||
-rw-r--r-- | archivers/streamvbyte/Makefile | 38 | ||||
-rw-r--r-- | archivers/streamvbyte/distinfo | 3 | ||||
-rw-r--r-- | archivers/streamvbyte/files/patch-CMakeLists.txt | 23 | ||||
-rw-r--r-- | archivers/streamvbyte/pkg-descr | 13 |
5 files changed, 78 insertions, 0 deletions
diff --git a/archivers/Makefile b/archivers/Makefile index 8494c1a9dc39..22c1259cb943 100644 --- a/archivers/Makefile +++ b/archivers/Makefile @@ -216,6 +216,7 @@ SUBDIR += snzip SUBDIR += squsq SUBDIR += star + SUBDIR += streamvbyte SUBDIR += stuffit SUBDIR += szip SUBDIR += tar-stream-chunker diff --git a/archivers/streamvbyte/Makefile b/archivers/streamvbyte/Makefile new file mode 100644 index 000000000000..69708e93a9a7 --- /dev/null +++ b/archivers/streamvbyte/Makefile @@ -0,0 +1,38 @@ +PORTNAME= streamvbyte +DISTVERSIONPREFIX= v +DISTVERSION= 0.4.1 +CATEGORIES= archivers + +MAINTAINER= jwb@FreeBSD.org +COMMENT= Integer compression with SIMD based on Google's varint + +LICENSE= APACHE20 +LICENSE_FILE= ${WRKSRC}/LICENSE + +BROKEN_powerpc= Test fails on big-endian systems +BROKEN_powerpc64= Test fails on big-endian systems + +USES= cmake +USE_GITHUB= yes +USE_LDCONFIG= yes + +GH_ACCOUNT= lemire + +CFLAGS+= -fPIC # For vbz-compression using static lib + +PLIST_FILES= include/streamvbyte.h \ + include/streamvbyte_zigzag.h \ + include/streamvbytedelta.h \ + lib/libstreamvbyte.so \ + lib/libstreamvbyte.so.0.0.1 \ + lib/libstreamvbyte_static.a + +# so version taken from basic Makefile +post-stage: + ${RLN} ${STAGEDIR}${PREFIX}/lib/libstreamvbyte.so \ + ${STAGEDIR}${PREFIX}/lib/libstreamvbyte.so.0.0.1 + +do-test: + cd ${WRKDIR}/.build && ./unit + +.include <bsd.port.mk> diff --git a/archivers/streamvbyte/distinfo b/archivers/streamvbyte/distinfo new file mode 100644 index 000000000000..d74374800ef6 --- /dev/null +++ b/archivers/streamvbyte/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1628771432 +SHA256 (lemire-streamvbyte-v0.4.1_GH0.tar.gz) = 4c4e53134a60b0b06816d3faa7dcde28c3e5e8a656dd415d16d80ae6e3d39fcc +SIZE (lemire-streamvbyte-v0.4.1_GH0.tar.gz) = 31065 diff --git a/archivers/streamvbyte/files/patch-CMakeLists.txt b/archivers/streamvbyte/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..d95df27fcffa --- /dev/null +++ b/archivers/streamvbyte/files/patch-CMakeLists.txt @@ -0,0 +1,23 @@ +--- CMakeLists.txt.orig 2021-08-11 23:13:03 UTC ++++ CMakeLists.txt +@@ -25,7 +25,6 @@ if(CMAKE_BUILD_TYPE MATCHES Debug) + else() + set(BASE_FLAGS + ${BASE_FLAGS} +- "-O3" + "-g" + ) + endif() +@@ -66,12 +65,6 @@ install(FILES + install( + TARGETS streamvbyte streamvbyte_static + DESTINATION lib) +-## -march=native is not supported on some platforms +-if(NOT MSVC) +-if(NOT STREAMVBYTE_DISABLE_NATIVE) +-set(OPT_FLAGS "-march=native") +-endif() +-endif() + + set(CMAKE_C_FLAGS "${STD_FLAGS} ${OPT_FLAGS} ${INCLUDE_FLAGS} ${WARNING_FLAGS} ${SANITIZE_FLAGS} ") + diff --git a/archivers/streamvbyte/pkg-descr b/archivers/streamvbyte/pkg-descr new file mode 100644 index 000000000000..449a758627f6 --- /dev/null +++ b/archivers/streamvbyte/pkg-descr @@ -0,0 +1,13 @@ +StreamVByte is an integer compression technique that applies SIMD +instructions (vectorization) to Google's varint approach. The net result +is faster than other byte-oriented compression techniques. + +The approach is patent-free, the code is available under the Apache License. + +It includes fast differential coding. + +It assumes a recent Intel processor (e.g., haswell or better, though we provide +runtime dispatching for compatibility with legacy systems) or an ARM processor +with NEON instructions (which is almost all of them). + +WWW: https://github.com/lemire/streamvbyte |