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.1.0.tar.gz (48.1 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.1.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (271.5 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

ultrabase64-1.1.0-cp314-cp314-win_amd64.whl (160.7 kB view details)

Uploaded CPython 3.14Windows x86-64

ultrabase64-1.1.0-cp314-cp314-macosx_10_12_x86_64.whl (239.5 kB view details)

Uploaded CPython 3.14macOS 10.12+ x86-64

ultrabase64-1.1.0-cp313-cp313-win_amd64.whl (160.7 kB view details)

Uploaded CPython 3.13Windows x86-64

ultrabase64-1.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (269.9 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

ultrabase64-1.1.0-cp313-cp313-macosx_10_12_x86_64.whl (239.5 kB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

ultrabase64-1.1.0-cp312-cp312-win_amd64.whl (160.7 kB view details)

Uploaded CPython 3.12Windows x86-64

ultrabase64-1.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (269.9 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

ultrabase64-1.1.0-cp312-cp312-macosx_10_12_x86_64.whl (239.5 kB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

ultrabase64-1.1.0-cp311-cp311-win_amd64.whl (161.9 kB view details)

Uploaded CPython 3.11Windows x86-64

ultrabase64-1.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (271.4 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

ultrabase64-1.1.0-cp311-cp311-macosx_10_12_x86_64.whl (241.2 kB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

ultrabase64-1.1.0-cp310-cp310-win_amd64.whl (161.9 kB view details)

Uploaded CPython 3.10Windows x86-64

ultrabase64-1.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (271.5 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

ultrabase64-1.1.0-cp39-cp39-win_amd64.whl (163.0 kB view details)

Uploaded CPython 3.9Windows x86-64

ultrabase64-1.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (272.9 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

ultrabase64-1.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (272.8 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

File details

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

File metadata

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

File hashes

Hashes for ultrabase64-1.1.0.tar.gz
Algorithm Hash digest
SHA256 8f9f3e8d54a698a4e821f550088147d01ff7cdeefdf0ca92138ecd7ec6e33327
MD5 802be0cb5dc950a7b3bda60ea03d2e4d
BLAKE2b-256 4a4ac604d6bf8f7c1a6a2f3a659cf19d61240ffc77012f2266927813e6725ea0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ultrabase64-1.1.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c60e71d76534b1ba49c3ba4d7578d1f62103ffc668896da87950d5157c3cb581
MD5 7e48e8df75f2a9190a7e1f323e8f4f64
BLAKE2b-256 dfaff00dd1ffa97df331dc5c9c6802be68db4dd0f482f9ca345535e13e307aca

See more details on using hashes here.

File details

Details for the file ultrabase64-1.1.0-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for ultrabase64-1.1.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 3b2b879c7258013060ea7afd5789da5b178bb705186b58ca093a2033a4235158
MD5 f32855dbab45ca144e975b92327e9f0a
BLAKE2b-256 9031eb3a24e83dab3e61cd5feb6c5a30f68a9987e206e5262c163427d250334b

See more details on using hashes here.

File details

Details for the file ultrabase64-1.1.0-cp314-cp314-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for ultrabase64-1.1.0-cp314-cp314-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 626324e49d4e827c776e1cefa7c5b87978d4f37d099670e58c8ba98735a70c5f
MD5 8e5fa3a2739752551e7c8fc3c5a3b6d0
BLAKE2b-256 95e1682f51acaa473093c6ed34852fb3e060c991dc9aeaf68ce66b4620cc6521

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ultrabase64-1.1.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 b3c18d2c1f831eefcbf3d21b7c420e781df1d91aa3d7cd3a03b1c758361dc9c6
MD5 60b282b13d5beb4ddef6bc69b248a19e
BLAKE2b-256 5bce4f5dc509564051d6153b2c50a744338314c97fb2be494b024dba108cb4ff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ultrabase64-1.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 273ee380f018e07d8fd0698d5a863f6046a683eb168e8b6497fed2dc05b09a45
MD5 c68c8af7bd38e71bf7683eb244a51d03
BLAKE2b-256 9d49e743455411c4d889afc33e82b09477ccf2a2e1a3fd746816124993817ac6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ultrabase64-1.1.0-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 5e1b7f94ad9153d061f5a3bfdc027094aa5a0532619990ae60511caf8c7b28ae
MD5 7096b26e7acb4fd40747ca5944b7de6f
BLAKE2b-256 0f0d3171d040c4cd4b4069cb29171cae74a027c3ddd8f5c5597edb83f9863551

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ultrabase64-1.1.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 c6885fbbf4a4102b7d69bf5a4377acefa604f6567af6d32e41fab0daf8bb3c1e
MD5 510dd1e76fe35e2b02d2baa6800054a1
BLAKE2b-256 4532d0fbfcce1f023add89c957b8d117b386ec19412e8c2e353145bf44cded1e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ultrabase64-1.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bc3e9c560d60ec5137248d0bf1168a776d187b1d9c47c923b8d0aa1179ebb701
MD5 5da02e0922e6caa4e596432f6191d7ce
BLAKE2b-256 49a6f13ab875338eb97284af7d1ff69e1620336b13a5abb15d3ab872eb5d5f38

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ultrabase64-1.1.0-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 f896cb96447e58035baf6e33a32f7e474b504dce9ea86c702a2db6c448bc4934
MD5 1f1a293992a97d0b47a79a1da6cc6be0
BLAKE2b-256 02a6a3a8c2434fee04e028c129c3608cad6506e3c97788e63925f096b7145a73

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ultrabase64-1.1.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 572c207aac91e5ee0f8e52586df1b3106da0c788ee89b9b51bfec9944b3d1e67
MD5 e50c1c0478bc1e264059cf3f4ba08a5e
BLAKE2b-256 0ff3c93c07b363560d23cd630b074be0a47fa276a4f02f248be2757f1e3cb31b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ultrabase64-1.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e59459480463d853b90e199b33e625aa88c4c3cc178817582e8519de52c57c56
MD5 ced26e9733c04c248be252f2d11f15a1
BLAKE2b-256 83403aacdd6c2201d495fb9daeedbb6c31e223dfeced8bd9f082bc1fdc705b2f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ultrabase64-1.1.0-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 531cac17572f31db09bff2da8de6d6f4df49df8ea1864ea5924d26bf5c409da2
MD5 5e8e602b0e758a8a4a50be1e1c634256
BLAKE2b-256 0665d67636e4a3bdadf06659e72daa84a2445b3ffe987907449eff55d0f801f2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ultrabase64-1.1.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 560e6c4692c6ed08f0fec0f336ca9608cf1b4817bf3d26fc089af8ccd941949e
MD5 1325f148628c088ad364e7eaa06e487d
BLAKE2b-256 d242e9bec66989b1c6956fa86e13ff9aa0eeff840c3a944cb2d9378ad52e3a4b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ultrabase64-1.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 198b42cfe58af3833eed3aa4eed47803b33206d0ab95657ceb967e4d85fd17bf
MD5 6e13740208f7d7b612c865c6c247e3fe
BLAKE2b-256 abc61c02540832e402fef5a39979714ddd831fff301b005e38debf8220c20d6b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ultrabase64-1.1.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 e18c3c92cf7e96c526d93b68f39f0828faab84b39c7be2d23612874d9256dfee
MD5 11ed59d8b9460e6a122d6c96460fe36a
BLAKE2b-256 0c219f78c426ddd2e4c0e8c92f8e9bc4e058660490d2a2f60a16ee73f712b374

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ultrabase64-1.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9b98fe893d880278ef77763267c715e04e815dd9c826c96e1680382b54dfbc0f
MD5 24636357fef49274eec5928b5d63aad2
BLAKE2b-256 32dbea5a019f8737f9b27c120c943f87a7d6f23a61cf56803e3e2ab891627623

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ultrabase64-1.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e637d815d25afb99824b33f760b7cd3105c917a9525d99ff3c2c266aed4f7ead
MD5 9386c0765b60a08488f6a59fe80f947a
BLAKE2b-256 784ead1a5160098905fedb4f95e85abb6efba010d1766df232b728dfb882d184

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