Skip to main content

A C++ implementation with Python bindings of StreamVByte.

Project description


libstreamvbyte


Table of Contents
  1. About The Project
  2. Getting Started
  3. Roadmap
  4. Contributing
  5. License
  6. Reference
  7. Contact

About The Project

libstreamvbyte is a C++ implementation of StreamVByte, with Python bidings using pybind11.

StreamVByte is a integer compression technique that use SIMD instructions (vectorization) to improve performance. The library is optimized for CPUs with the SSSE3 instruction set (which is supported by most x86_64 processors), and can also be used with ARM processors and other 32-bit architectures, although it will fall back to scalar implementations in those cases.

With libstreamvbyte, you can quickly and efficiently compress integer sequences, reducing the amount of storage space and network bandwidth required. The library is easy to use and integrates seamlessly with Python via pybind11 bindings. Whether you're working with large datasets or building a distributed computing system, libstreamvbyte can help you improve performance and reduce the resources needed to handle your data.

(back to top)

Getting Started

Installation

Using pip

pip install libstreamvbyte

Using .whl

See releases.

Usage

Import libstreamvbyte first.

import libstreamvbyte as svb

And here are the APIs.

# Encode a list of integers into a byte array.
# Currently only supports np.uint32
encode(arg0: numpy.ndarray[numpy.uint32]) -> numpy.ndarray[numpy.uint8]

# Decode a byte array into a list of integers.
decode(arg0: numpy.ndarray[numpy.uint8], arg1: int) -> numpy.ndarray[numpy.uint32]

Example

import libstreamvbyte as svb

N = 2**20

# type(before_encode) == np.ndarray
# before_encode.dtype == np.uint32
before_encode = np.random.randint(0, 2**32, N, dtype=np.uint32)

# type(compressed_bytes) == np.ndarray
# compressed_bytes.dtype == np.uint8
compressed_bytes = svb.encode(before_encode)

# type(after_decode) == np.ndarray
# after_decode.dtype == np.uint32
after_decode = svb.decode(compressed_bytes, N)

(back to top)

Roadmap

  • Zigzag encoding/decoding.
  • Support ARM processors with NEON intrinsics.
  • Differential coding (delta encoding/decoding).

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feat/amazing-feature)
  3. Commit your Changes with Conventional Commits
  4. Push to the Branch (git push origin feat/amazing-feature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE for more information.

(back to top)

Reference

(back to top)

Contact

Author

Project Link

(back to top)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

libstreamvbyte-0.1.0.tar.gz (759.6 kB view details)

Uploaded Source

Built Distributions

libstreamvbyte-0.1.0-cp311-cp311-win_amd64.whl (57.8 kB view details)

Uploaded CPython 3.11 Windows x86-64

libstreamvbyte-0.1.0-cp311-cp311-win32.whl (46.3 kB view details)

Uploaded CPython 3.11 Windows x86

libstreamvbyte-0.1.0-cp311-cp311-musllinux_1_1_x86_64.whl (604.1 kB view details)

Uploaded CPython 3.11 musllinux: musl 1.1+ x86-64

libstreamvbyte-0.1.0-cp311-cp311-musllinux_1_1_i686.whl (659.8 kB view details)

Uploaded CPython 3.11 musllinux: musl 1.1+ i686

libstreamvbyte-0.1.0-cp311-cp311-musllinux_1_1_aarch64.whl (585.3 kB view details)

Uploaded CPython 3.11 musllinux: musl 1.1+ ARM64

libstreamvbyte-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (78.7 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

libstreamvbyte-0.1.0-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl (82.9 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ i686

libstreamvbyte-0.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (72.7 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARM64

libstreamvbyte-0.1.0-cp311-cp311-macosx_10_9_universal2.whl (99.9 kB view details)

Uploaded CPython 3.11 macOS 10.9+ universal2 (ARM64, x86-64)

libstreamvbyte-0.1.0-cp310-cp310-win_amd64.whl (57.8 kB view details)

Uploaded CPython 3.10 Windows x86-64

libstreamvbyte-0.1.0-cp310-cp310-win32.whl (46.3 kB view details)

Uploaded CPython 3.10 Windows x86

libstreamvbyte-0.1.0-cp310-cp310-musllinux_1_1_x86_64.whl (604.1 kB view details)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

libstreamvbyte-0.1.0-cp310-cp310-musllinux_1_1_i686.whl (659.8 kB view details)

Uploaded CPython 3.10 musllinux: musl 1.1+ i686

libstreamvbyte-0.1.0-cp310-cp310-musllinux_1_1_aarch64.whl (585.3 kB view details)

Uploaded CPython 3.10 musllinux: musl 1.1+ ARM64

libstreamvbyte-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (78.7 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

libstreamvbyte-0.1.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl (82.9 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ i686

libstreamvbyte-0.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (72.8 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

libstreamvbyte-0.1.0-cp310-cp310-macosx_10_9_universal2.whl (99.9 kB view details)

Uploaded CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64)

File details

Details for the file libstreamvbyte-0.1.0.tar.gz.

File metadata

  • Download URL: libstreamvbyte-0.1.0.tar.gz
  • Upload date:
  • Size: 759.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.1

File hashes

Hashes for libstreamvbyte-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6c3ea5fb781a4b6e7b022421769136f901dc36e0bcf03168779f3f65ba13d9f8
MD5 08567e4733a9dc97b17459494d663d8a
BLAKE2b-256 48310959d6fd708c89b7178056f65bfb89bf5574061c107ea2979030f2fc22f8

See more details on using hashes here.

File details

Details for the file libstreamvbyte-0.1.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for libstreamvbyte-0.1.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 1d2071df9918f3b5b5bbcc9633b2cb1b51bd9dddb28dab3448754a10241c8b92
MD5 9ba07b2c22ed76f2fa84f497f6cb4fa8
BLAKE2b-256 72df83b863573d766ee8e05f72749e76de7fd30406495b45bf5b2d60a3d4f8b0

See more details on using hashes here.

File details

Details for the file libstreamvbyte-0.1.0-cp311-cp311-win32.whl.

File metadata

File hashes

Hashes for libstreamvbyte-0.1.0-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 6a9a5242a1fdb49357492a5e452c84a8b746f44f5b8e147ab7a0fe57530b8d42
MD5 3032bef9933f368bd3140dc1f42aaef9
BLAKE2b-256 7a7f27eb5fca261c09cba00e808ecef6899750b331a2ed1b2e69d884c57e4720

See more details on using hashes here.

File details

Details for the file libstreamvbyte-0.1.0-cp311-cp311-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for libstreamvbyte-0.1.0-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 fc94e9a88d6fedb06c210298066e1e584bd986cbc96a334e04e901a9c5cdefa2
MD5 9beaf6f8cf3b14b1395658b7a8f120a8
BLAKE2b-256 86ba71f016a8db31f2b4d75db6ff59b297a5a86c62085bc2a40b6c43d374e110

See more details on using hashes here.

File details

Details for the file libstreamvbyte-0.1.0-cp311-cp311-musllinux_1_1_i686.whl.

File metadata

File hashes

Hashes for libstreamvbyte-0.1.0-cp311-cp311-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 71df1c09f4fea6af159581a0797fe06f4c1bea841021ba52707ab6fa1dce3924
MD5 cfe54a3963de4651e2ef795685d83c73
BLAKE2b-256 7b9092824762c15ed130319936e565c28fea5b1ed45a793dfad7d68b6a090de5

See more details on using hashes here.

File details

Details for the file libstreamvbyte-0.1.0-cp311-cp311-musllinux_1_1_aarch64.whl.

File metadata

File hashes

Hashes for libstreamvbyte-0.1.0-cp311-cp311-musllinux_1_1_aarch64.whl
Algorithm Hash digest
SHA256 566302d403db3b848c3392593dc4b1083a2f7dd55c04621d63f95a9adde3000d
MD5 c34a8a1ebd21ad53d73e66edfeb121d3
BLAKE2b-256 4372bc68239088f190e8e14b75839163ed02937c060e1ac865090449a40930c6

See more details on using hashes here.

File details

Details for the file libstreamvbyte-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for libstreamvbyte-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0b504427ad232c312536b9b0a1e73b7de1a982e2ad506e7650354cada496f4ce
MD5 999b7e334327f9ddf578e95f364b4ada
BLAKE2b-256 ccdca0edab6ae66f0352fb311e139d67f33f57ca6855ee07d8a0f43a76ad9985

See more details on using hashes here.

File details

Details for the file libstreamvbyte-0.1.0-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for libstreamvbyte-0.1.0-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 9ab4a8ab08863914df1f93e75dba7e99a62e3ecff0c871cecdfadc2feba478a1
MD5 7649317e089a73de05c07083193bfff5
BLAKE2b-256 ff29334a4f5ebcc43ae019ea151c7a8b159ab889092b657506fb0c5bdf9ebc30

See more details on using hashes here.

File details

Details for the file libstreamvbyte-0.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for libstreamvbyte-0.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 671b3d13b7ca08f83e937131b86bf098e4d81b4d8f88f7f5143b6c3325f71092
MD5 97c45b7eb4984bebda6c73d82882219e
BLAKE2b-256 aa19626f35c9d7c3dea8b61a4f0aaa8ec2245c91bcbecefa69bca396eec8bcf8

See more details on using hashes here.

File details

Details for the file libstreamvbyte-0.1.0-cp311-cp311-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for libstreamvbyte-0.1.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 901a71cfcea3f7edb61306d59e01050b49ae0abb3de6c64ad63275ad2ad8a6c5
MD5 26c76aaa912dd08f7f7ba107d7caabe3
BLAKE2b-256 14668f356668ff8a5af9452289a617b2f8983067808732aaa744171cd77be324

See more details on using hashes here.

File details

Details for the file libstreamvbyte-0.1.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for libstreamvbyte-0.1.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 75b6de57200739ccb8fba6c0661da84d0ed96e417d2b0b99d3c010318675e2a9
MD5 7bf777adf110ac2d846b84c9d08307c4
BLAKE2b-256 b1dce84c8d297ed1c6ff19ce49d85df9b478f77ff451b2f3982dd71e019d59c9

See more details on using hashes here.

File details

Details for the file libstreamvbyte-0.1.0-cp310-cp310-win32.whl.

File metadata

File hashes

Hashes for libstreamvbyte-0.1.0-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 d677beb5776f27132118af1afdfbfa0cc565a5eb598af9fbfed65d4ff0f24908
MD5 f27e2db6e19ea3997c6a39a6172f2d0e
BLAKE2b-256 c9c01b1aabf9ffda6b17d59ce2b2ade835d80bb2c1bcf18aadb28be28dedaad8

See more details on using hashes here.

File details

Details for the file libstreamvbyte-0.1.0-cp310-cp310-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for libstreamvbyte-0.1.0-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 c8864649391245e1cc145a1ff4d056e206beb69cb95cff81efd68a4be39cb5e1
MD5 3e0fc33ee0418155ade9dd9adc685091
BLAKE2b-256 198abe8c85381c6f562fc572a799a8676bd82a00b701dea75b79ec8eb69f6f92

See more details on using hashes here.

File details

Details for the file libstreamvbyte-0.1.0-cp310-cp310-musllinux_1_1_i686.whl.

File metadata

File hashes

Hashes for libstreamvbyte-0.1.0-cp310-cp310-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 1006d6dbe607bf001b79a8887de16db7b97ae508c8761b4110dd71935fdff5c8
MD5 17250f72a1ee5ff54bdcee866d885fc1
BLAKE2b-256 df3a6fd7a254f612d1b024c8e912e1a3e3d4d5d950d66765243b60d03439476d

See more details on using hashes here.

File details

Details for the file libstreamvbyte-0.1.0-cp310-cp310-musllinux_1_1_aarch64.whl.

File metadata

File hashes

Hashes for libstreamvbyte-0.1.0-cp310-cp310-musllinux_1_1_aarch64.whl
Algorithm Hash digest
SHA256 0741d117ed5513c71227bc1202b409e696749aa339ffe85819d90d79c529cb3c
MD5 c3a9ae47585fedaadc77fd7dee0129e1
BLAKE2b-256 727ce9f70056ccc8ced679ce558ea9d0e92655715579f0065e0225ffecb175ae

See more details on using hashes here.

File details

Details for the file libstreamvbyte-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for libstreamvbyte-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ed2878526d27fc0e151273061b30732a7e64c258ade50de571da849d23095d1f
MD5 ddc5b841ae04888a889946240eb2e62e
BLAKE2b-256 7033a03d9ddf810649bdd798c54d082159f66690f7d732290cc95d062721aed6

See more details on using hashes here.

File details

Details for the file libstreamvbyte-0.1.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for libstreamvbyte-0.1.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 0743fde1d748165ae22001996ba248142fc1d494c473c1b8cf68472c0021bdce
MD5 d02ef73573f4beae55d97a3e275dd201
BLAKE2b-256 abcdac338d6d98c6ae17f77bd78d25218fddf896849d10eef18c6966535b5e40

See more details on using hashes here.

File details

Details for the file libstreamvbyte-0.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for libstreamvbyte-0.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 7446e8662386eea2296b508119233698106a6795e9b3e083758ab786ed927ea0
MD5 65cf8b81cb3806c0eefbf9b5a1b82243
BLAKE2b-256 24594d55d8f6d64891a7202c5fbee011cbe55a7f69c7bec9a8f0600102a40f9d

See more details on using hashes here.

File details

Details for the file libstreamvbyte-0.1.0-cp310-cp310-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for libstreamvbyte-0.1.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 8bc63d20f53b1add870a69a7d7e048b161beca14c2508d9b256161dc955e5318
MD5 e5bd138b7908925c186560d593244216
BLAKE2b-256 12760a37bee1731bf7f6bff3754fce3d6844773deb0ca9a95311c2fcca377f2d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page