Skip to content

Commit 4d23fea

Browse files
committed
saving.
1 parent d4acd1a commit 4d23fea

4 files changed

Lines changed: 39 additions & 19 deletions

File tree

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Ubuntu 20.04 CI (GCC 9.4 and 10, LLVM 10 and 11)
1+
name: Ubuntu 24.04 CI (GCC 13, 14, LLVM 17, 18)
22

33
on:
44
push:
@@ -13,17 +13,19 @@ jobs:
1313
if: >-
1414
! contains(toJSON(github.event.commits.*.message), '[skip ci]') &&
1515
! contains(toJSON(github.event.commits.*.message), '[skip github]')
16-
runs-on: ubuntu-20.04
16+
runs-on: ubuntu-24.04
1717
strategy:
1818
fail-fast: false
1919
matrix:
2020
include:
2121
- {compiler: gcc}
22-
- {compiler: gcc-10}
22+
- {compiler: gcc-13}
23+
- {compiler: gcc-14}
2324
- {compiler: clang}
24-
- {compiler: clang-11}
25+
- {compiler: clang-17}
26+
- {compiler: clang-18}
2527
steps:
26-
- uses: actions/checkout@v3
28+
- uses: actions/checkout@v4
2729
- name: Use cmake (debug)
2830
run: |
2931
mkdir builddebug &&

.github/workflows/vs16.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: VS16-CI
1+
name: VS-Latest-CI
22

33
on:
44
push:
@@ -13,23 +13,23 @@ jobs:
1313
if: >-
1414
! contains(toJSON(github.event.commits.*.message), '[skip ci]') &&
1515
! contains(toJSON(github.event.commits.*.message), '[skip github]')
16-
name: windows-vs16
17-
runs-on: windows-2019
16+
name: windows-2025
17+
runs-on: windows-2025
1818
strategy:
1919
fail-fast: false
2020
matrix:
2121
include:
22-
- {gen: Visual Studio 16 2019, mode: , arch: Win32, static: ON}
23-
- {gen: Visual Studio 16 2019, mode: , arch: Win32, static: OFF}
24-
- {gen: Visual Studio 16 2019, mode: , arch: x64, static: ON}
25-
- {gen: Visual Studio 16 2019, mode: , arch: x64, static: OFF}
26-
- {gen: Visual Studio 16 2019, mode: -T ClangCL, arch: Win32, static: ON}
27-
- {gen: Visual Studio 16 2019, mode: -T ClangCL, arch: Win32, static: OFF}
28-
- {gen: Visual Studio 16 2019, mode: -T ClangCL, arch: x64, static: ON}
29-
- {gen: Visual Studio 16 2019, mode: -T ClangCL, arch: x64, static: OFF}
22+
- {gen: Visual Studio 17 2022, mode: , arch: Win32, static: ON}
23+
- {gen: Visual Studio 17 2022, mode: , arch: Win32, static: OFF}
24+
- {gen: Visual Studio 17 2022, mode: , arch: x64, static: ON}
25+
- {gen: Visual Studio 17 2022, mode: , arch: x64, static: OFF}
26+
- {gen: Visual Studio 17 2022, mode: -T ClangCL, arch: Win32, static: ON}
27+
- {gen: Visual Studio 17 2022, mode: -T ClangCL, arch: Win32, static: OFF}
28+
- {gen: Visual Studio 17 2022, mode: -T ClangCL, arch: x64, static: ON}
29+
- {gen: Visual Studio 17 2022, mode: -T ClangCL, arch: x64, static: OFF}
3030
steps:
3131
- name: checkout
32-
uses: actions/checkout@v3
32+
uses: actions/checkout@v4
3333
- name: Configure
3434
run: |
3535
cmake -G "${{matrix.gen}}" -A ${{matrix.arch}} "${{matrix.mode}}" -DSIMDJSON_DEVELOPER_MODE=ON -DSIMDJSON_COMPETITION=OFF -DSIMDJSON_BUILD_STATIC=${{matrix.static}} -DSTREAMVBYTE_ENABLE_EXAMPLES=ON -DSTREAMVBYTE_ENABLE_TESTS=ON -DSTREAMVBYTE_WALL=ON -DSTREAMVBYTE_WERROR=ON -B build

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,11 @@ option(STREAMVBYTE_ENABLE_EXAMPLES "Enable examples for streamvbyte" OFF)
161161
if(STREAMVBYTE_ENABLE_EXAMPLES)
162162
add_executable(example ${PROJECT_SOURCE_DIR}/examples/example.c)
163163
target_link_libraries(example streamvbyte)
164+
165+
if(NOT MSVC)
166+
add_executable(compress_decimal_encoded_integers ${PROJECT_SOURCE_DIR}/examples/compress_decimal_encoded_integers.c)
167+
target_link_libraries(compress_decimal_encoded_integers streamvbyte)
168+
endif()
164169
endif()
165170

166171
option(STREAMVBYTE_ENABLE_TESTS "Enable unit tests for streamvbyte" OFF)

README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
streamvbyte
22
===========
33
[![Ubuntu 22.04 CI (GCC 9, 10, 11 and 12, LLVM 12, 13, 14)](https://github.com/lemire/streamvbyte/actions/workflows/ubuntu22.yml/badge.svg)](https://github.com/lemire/streamvbyte/actions/workflows/ubuntu22.yml)
4-
[![Ubuntu 20.04 CI (GCC 9.4 and 10, LLVM 10 and 11)](https://github.com/lemire/streamvbyte/actions/workflows/ubuntu20.yml/badge.svg)](https://github.com/lemire/streamvbyte/actions/workflows/ubuntu20.yml)
4+
[![Ubuntu 24.04 CI (GCC 13, 14, LLVM 17, 18)](https://github.com/lemire/streamvbyte/actions/workflows/ubuntu24.yml/badge.svg)](https://github.com/lemire/streamvbyte/actions/workflows/ubuntu24.yml)
55
[![macOS 11 CI (LLVM 13, GCC 10, 11, 12)](https://github.com/lemire/streamvbyte/actions/workflows/macos.yml/badge.svg)](https://github.com/lemire/streamvbyte/actions/workflows/macos.yml)
6-
[![VS16-CI](https://github.com/lemire/streamvbyte/actions/workflows/vs16.yml/badge.svg)](https://github.com/lemire/streamvbyte/actions/workflows/vs16.yml)
6+
[![VS-Latest-CI](https://github.com/lemire/streamvbyte/actions/workflows/vs16.yml/badge.svg)](https://github.com/lemire/streamvbyte/actions/workflows/vs16.yml)
77
[![VS17-CI](https://github.com/lemire/streamvbyte/actions/workflows/vs.yml/badge.svg)](https://github.com/lemire/streamvbyte/actions/workflows/vs.yml)
88

99
StreamVByte is a new integer compression technique that applies SIMD instructions (vectorization) to
@@ -44,6 +44,19 @@ This library is used by
4444

4545
See `examples/example.c` for an example.
4646

47+
The `examples/compress_decimal_encoded_integers.c` program reads decimal-encoded
48+
32-bit unsigned integers (whitespace-separated) from a text file, compresses
49+
them with StreamVByte, and reports the resulting compression ratio. When the
50+
examples are enabled in the CMake build (`-DSTREAMVBYTE_ENABLE_EXAMPLES=ON`),
51+
it is built as `compress_decimal_encoded_integers` and may be invoked as:
52+
53+
```
54+
./build/compress_decimal_encoded_integers IN_FILENAME [OUT_FILENAME]
55+
```
56+
57+
If the optional `OUT_FILENAME` is provided, the compressed bytes are written
58+
to that file. This example is not built under MSVC because it uses POSIX I/O.
59+
4760
Short code sample:
4861
```C
4962
// suppose that datain is an array of uint32_t integers

0 commit comments

Comments
 (0)