Skip to main content

b64fx

b64fx is a Python library for encoding and decoding data in various base formats with optional compression support. It provides both synchronous and asynchronous APIs for efficient processing of data.

Features

  • Encode/decode with Base16, Base32, Base32hex, Base64, Base85, Ascii85, and Z85.
  • URL-safe Base64 encoding and decoding.
  • Optional LZ4 compression/decompression for efficient storage.
  • Async file encoding/decoding for handling large data without blocking.
  • Compatible with Python 3.8+.

Installation

From PyPI (if uploaded)

pip install b64fx

Usage

All-in-one example:

import asyncio
import b64fx

# Original data
data = "Hello, world! This is a test string."
print("Original:", data)

# ===== Synchronous compression + Base64 =====
encoded = b64fx.encz(data)
print("Compressed + Encoded:", encoded)

decoded = b64fx.decz(encoded)
print("Decoded + Decompressed:", decoded.decode('utf-8'))

# ===== Base Encodings =====
raw_bytes = data.encode('utf-8')

# Base64
b64 = b64fx.standard_b64encode(raw_bytes)
print("Base64:", b64)
print("Base64 Decoded:", b64fx.standard_b64decode(b64))

# URL-safe Base64
url_b64 = b64fx.urlsafe_b64encode(raw_bytes)
print("URL-safe Base64:", url_b64)
print("URL-safe Base64 Decoded:", b64fx.urlsafe_b64decode(url_b64))

# Base32
b32 = b64fx.b32encode(raw_bytes)
print("Base32:", b32)
print("Base32 Decoded:", b64fx.b32decode(b32))

# Base32hex
b32hex = b64fx.b32hexencode(raw_bytes)
print("Base32hex:", b32hex)
print("Base32hex Decoded:", b64fx.b32hexdecode(b32hex))

# Base85 / Ascii85 / Z85
b85 = b64fx.b85encode(raw_bytes)
print("Base85:", b85)
print("Base85 Decoded:", b64fx.b85decode(b85))

a85 = b64fx.a85encode(raw_bytes)
print("Ascii85:", a85)
print("Ascii85 Decoded:", b64fx.a85decode(a85))

z85 = b64fx.z85encode(raw_bytes)
print("Z85:", z85)
print("Z85 Decoded:", b64fx.z85decode(z85))

Metadata

Release files for b64fx 1.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for b64fx 1.0.6
File Size Uploaded Provenance
b64fx-1.0.6.tar.gz 5.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for b64fx 1.0.6
File Interpreter ABI Platform
b64fx-1.0.6-py3-none-any.whl Python 3 none any Details

Total release size: 11.6 kB

Release files / b64fx-1.0.6.tar.gz

Download URL b64fx-1.0.6.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
40b033edf95882b90021cb09e095b8bdb9e0084b8894cda3330bd195faecaf5a
BLAKE2b-256 checksum
How to use checksums
a5dfba2c821226cd87bc9540c31b3e2a295d5b894910dc1e570648640027d6ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / b64fx-1.0.6-py3-none-any.whl

Download URL b64fx-1.0.6-py3-none-any.whl
Size 5.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fab484327f7ec4f1dcbf5fb2090103d5baed6860c1b3ce79ed3b7d6859d40797
BLAKE2b-256 checksum
How to use checksums
d0a5ad7e8b1a8656543c9310558ea38cbaea34c251068449c253aa9e319ca693
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Security for b64fx 1.0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page