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.
This commit is contained in:
Jason W. Bacon 2021-08-12 19:38:32 -05:00
parent e526133353
commit ebe45fb054
5 changed files with 78 additions and 0 deletions

View file

@ -216,6 +216,7 @@
SUBDIR += snzip
SUBDIR += squsq
SUBDIR += star
SUBDIR += streamvbyte
SUBDIR += stuffit
SUBDIR += szip
SUBDIR += tar-stream-chunker

View file

@ -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>

View file

@ -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

View file

@ -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} ")

View file

@ -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