Skip to main content

Ultra-fast Base64 encoding/decoding library with SIMD and multithreading support

Project description

UltraBase64

Ultra-fast Base64 encoding/decoding library with SIMD and multithreading support, written in Rust for Python.

Features

  • Blazing Fast: Utilizes SIMD instructions (AVX2/SSE/NEON) for maximum performance
  • Multithreaded: Automatic multithreading for large data sets
  • Memory Efficient: Zero-copy operations where possible
  • Cross-Platform: Works on Linux, Windows, and macOS
  • Easy to Use: Simple Python API

Installation

pip install ultrabase64

Usage

import ultrabase64

# Basic encoding/decoding
data = b"Hello, World!"
encoded = ultrabase64.encode(data)
decoded = ultrabase64.decode(encoded)

print(f"Original: {data}")
print(f"Encoded: {encoded}")
print(f"Decoded: {decoded}")

# Encoding with specific number of threads
large_data = b"x" * 1000000
encoded_threaded = ultrabase64.encode_with_threads(large_data, threads=4)

Performance

UltraBase64 automatically chooses the optimal strategy:

  • Small data (< 256KB): Single-threaded with SIMD optimizations
  • Large data (>= 256KB): Multi-threaded processing using all available CPU cores
  • Custom threading: Use encode_with_threads() for manual control

API Reference

encode(data: bytes) -> str

Encodes bytes to Base64 string with automatic optimization.

decode(data: str) -> bytes

Decodes Base64 string to bytes.

encode_with_threads(data: bytes, threads: int) -> str

Encodes bytes to Base64 string using specified number of threads.

Building from Source

Requirements:

  • Python 3.8+
  • Rust toolchain
  • maturin
git clone https://github.com/yourusername/ultrabase64
cd ultrabase64
maturin develop --release

License

This project is licensed under either of

  • Apache License, Version 2.0
  • MIT license

at your option.

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

ultrabase64-1.0.13.tar.gz (17.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

ultrabase64-1.0.13-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (245.0 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

ultrabase64-1.0.13-cp313-cp313-win_amd64.whl (133.7 kB view details)

Uploaded CPython 3.13Windows x86-64

ultrabase64-1.0.13-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (243.5 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

ultrabase64-1.0.13-cp313-cp313-macosx_10_12_x86_64.whl (213.6 kB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

ultrabase64-1.0.13-cp312-cp312-win_amd64.whl (133.7 kB view details)

Uploaded CPython 3.12Windows x86-64

ultrabase64-1.0.13-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (243.5 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

ultrabase64-1.0.13-cp312-cp312-macosx_10_12_x86_64.whl (213.6 kB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

ultrabase64-1.0.13-cp311-cp311-win_amd64.whl (134.7 kB view details)

Uploaded CPython 3.11Windows x86-64

ultrabase64-1.0.13-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (245.0 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

ultrabase64-1.0.13-cp311-cp311-macosx_10_12_x86_64.whl (215.3 kB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

ultrabase64-1.0.13-cp310-cp310-win_amd64.whl (134.7 kB view details)

Uploaded CPython 3.10Windows x86-64

ultrabase64-1.0.13-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (245.0 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

ultrabase64-1.0.13-cp39-cp39-win_amd64.whl (135.5 kB view details)

Uploaded CPython 3.9Windows x86-64

ultrabase64-1.0.13-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (245.9 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

ultrabase64-1.0.13-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (245.9 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

File details

Details for the file ultrabase64-1.0.13.tar.gz.

File metadata

  • Download URL: ultrabase64-1.0.13.tar.gz
  • Upload date:
  • Size: 17.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.7

File hashes

Hashes for ultrabase64-1.0.13.tar.gz
Algorithm Hash digest
SHA256 4ab46f61a78d33b97917e4fb59dd23e34521229eb3636db28d9fe74eefe41516
MD5 c1989434e45766dc2087959d2b320f61
BLAKE2b-256 74ef152b729d13935e9479abd6ec763808fa526398764c333f87701f355a8709

See more details on using hashes here.

File details

Details for the file ultrabase64-1.0.13-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ultrabase64-1.0.13-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2bed630e1ad2c91c8ca128385ba658f58349fe32d358c797a9091e97fd73ca68
MD5 f611b0948454ec3310840de1fab822ed
BLAKE2b-256 746c2a81d754eadb059a7a94794a9e91c8749f09057f514cf5876f6f1225ad92

See more details on using hashes here.

File details

Details for the file ultrabase64-1.0.13-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for ultrabase64-1.0.13-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 0d0b09a6c4df5607c6a8a9d256d59c47c90255f96b2257d1ffbf8870aac2ae81
MD5 a70d1a42f7f7e065e4fb4bcbae2009c0
BLAKE2b-256 cf6c2304b60fd582d6591f579146fa7efd43704cb1471277e1680287889a8b5a

See more details on using hashes here.

File details

Details for the file ultrabase64-1.0.13-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ultrabase64-1.0.13-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b5fd0466ee62e282d757505c07562b62b76b81c485a166d517c63202894af02f
MD5 3989ae0fade92230ee0f0d2560d4d323
BLAKE2b-256 d8079f2c5d75faadd0812fec11425505fb4e0ac77deeab4a8e202078817f112a

See more details on using hashes here.

File details

Details for the file ultrabase64-1.0.13-cp313-cp313-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for ultrabase64-1.0.13-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 e7ec7f280e58477465089a6f7e8f1304a63025dc4b4aa97f656a7ae54b70f795
MD5 904d4da776c9fc3526ee2f0f1095af94
BLAKE2b-256 d215190fe9933c05cdc83588c41e859ce25aa5825837e56f4e046ac6224ad887

See more details on using hashes here.

File details

Details for the file ultrabase64-1.0.13-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for ultrabase64-1.0.13-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 502a67b6dedb696496fc414fd684a507db2dd74370ea78bef9e91f8f1a04c480
MD5 d753660668a9c84344e2404a58fe23cb
BLAKE2b-256 20d823fc0818201ececa0d85e7c902ee97e16561abc175109bb525851054fd5a

See more details on using hashes here.

File details

Details for the file ultrabase64-1.0.13-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ultrabase64-1.0.13-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a61b415dca45591f7c21405f75091a63eeb98bd92d8bfa8402c346069ec9541a
MD5 f38fea30cce26120c0acba994674be02
BLAKE2b-256 8cf9affcd82afd1658989b80d1bb608b3324c53d733c45a7b102ecd91d82b43a

See more details on using hashes here.

File details

Details for the file ultrabase64-1.0.13-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for ultrabase64-1.0.13-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 633b6b7dd08058a7ea8575be28e1201bc0cfa0dd1c7501668d2c4a8ff0631272
MD5 575eedd7d1c526f58408bcf37faf40b7
BLAKE2b-256 028ca788e880aa6335dd69ce6339d196915dbc7af2ca75a5e12eef5e6f9fd8c7

See more details on using hashes here.

File details

Details for the file ultrabase64-1.0.13-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for ultrabase64-1.0.13-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 457a096feaa4ad505c6dc82a191403b22a68dfccd27ec098a7999bb1ece4f8a6
MD5 41de450ae6d806c057190f86ba0e9f6b
BLAKE2b-256 8c50a80d7c767bffb2c104ab7b15d40012269aaa2cb52d3401f2dc6925770d02

See more details on using hashes here.

File details

Details for the file ultrabase64-1.0.13-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ultrabase64-1.0.13-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 600f74cfaf1a650818353cab27606fa2beeecb54d271a556dfa9fa7b025d483b
MD5 cb99f2e2e041fcc5722e3edc18e03c2d
BLAKE2b-256 f9eddc6b188879f80f367ebc65e6f85d5212dee75918b60e816aefe3f20f1862

See more details on using hashes here.

File details

Details for the file ultrabase64-1.0.13-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for ultrabase64-1.0.13-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 1e49382479b8d990627e321cdc02df1d981a41125bb3cc573e9f09a82c6aaac1
MD5 4741235fe1e486b9247e44e770e4db1e
BLAKE2b-256 bc9087d48887021d27b7fbc5364b660a2de39203ae6f361f3bdad1541465d19d

See more details on using hashes here.

File details

Details for the file ultrabase64-1.0.13-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for ultrabase64-1.0.13-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 424e8f5708bfa5406953a7271dfe1cb5ceded23cc8c2f563844fa3c822a0f74a
MD5 73cf81555a0c06e85327c3595fc58b89
BLAKE2b-256 accd07c9026d2c9ef56ddc0784389ef1695cc3955478be9367fb87a5f8299f0d

See more details on using hashes here.

File details

Details for the file ultrabase64-1.0.13-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ultrabase64-1.0.13-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2f20f20c62e38158a305cdbf8968ebe558ff964f51668e6662a543590aa362ae
MD5 2dcdc88bb42665f09342a957e738df7a
BLAKE2b-256 846e71cf28ad2c56f966ad2365e5f209fbdf133a29d2ecb45d0299e8b14493f8

See more details on using hashes here.

File details

Details for the file ultrabase64-1.0.13-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for ultrabase64-1.0.13-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 508bf034e6ee67f17fb6988a0a69728a9fa3b8cf37ff17d060d46483cd4070f7
MD5 ab12f764b89827c85ff417027748fa54
BLAKE2b-256 240a99440fee1c24c5a658e5db80f4b58d30d7b4c092316c5273a050473c98d5

See more details on using hashes here.

File details

Details for the file ultrabase64-1.0.13-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ultrabase64-1.0.13-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c0e5f40884cc4cd366cfb7afb7e4ef2321f8b4c5b064baf4664e1aa554b3cf41
MD5 956e1cb9ed5e95392184c37032ac015d
BLAKE2b-256 01d2d2ff319c367c58807c2864277c5224608dafdeb03d01575e34dd104871bc

See more details on using hashes here.

File details

Details for the file ultrabase64-1.0.13-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ultrabase64-1.0.13-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0fb58899c06b537b9cad04e2067509263ae82340d5a8879a2b3d6d629cb968c5
MD5 f27e55450f8051bb65ac9b0d6b995754
BLAKE2b-256 ad7f2285c2892dbc1e74b2f1bdc20d70549ab8f2174eeb6ac3c7362b5fada6f7

See more details on using hashes here.

Supported by

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