Base64 stream encode/decode library
Project description
b64-stream
b64-stream is a Python binding for the b64-stream. This is Base64 stream encode/decode library.
Installation
pip install b64-stream
Getting started
b64-stream implements classes:
Base64StreamDecodeBase64StreamEncode
Every class has:
- __init__(buffer_size: int = 2000) - buffer_size used by create buffer for update method for new encoded/decoded chunk.
- buffer_size - size of buffer
- total - total encoded/decoded bytes
- clear() - reset state to initial
- update(chunk) - processing chunk
- finalize() - end of processing
Usage examples
Decode data
from b64_stream import Base64StreamDecode
chunks = [b'MTIzNDU2', b'NzEyMzQ1Njc=']
result = []
decoder = Base64StreamDecode()
for chunk in chunks:
for r_chunk in decoder.update(chunk):
result.append(r_chunk)
decoder.finalize()
Encode data
chunks = [b'1234567', b'1234567']
encoder = Base64StreamEncode()
result = []
for chunk in chunks:
for r_chunk in encoder.update(chunk):
result.append(r_chunk)
result.append(encoder.finalize())
License
b64-stream is licensed under the Apache 2.0 License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file b64-stream-1.0.0.tar.gz.
File metadata
- Download URL: b64-stream-1.0.0.tar.gz
- Upload date:
- Size: 70.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb3356d80dc99ffd5a86e5948eae2f6f6a50cc2a4ac3954cf8f8ae4bec6bbb29
|
|
| MD5 |
9b2d543a1afc660558a96c554c38bc5f
|
|
| BLAKE2b-256 |
ed4706f2dc16a9932d8f7596be35323ffa7514dbfe325316baf3f6ca16c42d73
|
File details
Details for the file b64_stream-1.0.0-cp38-cp38-manylinux2014_x86_64.whl.
File metadata
- Download URL: b64_stream-1.0.0-cp38-cp38-manylinux2014_x86_64.whl
- Upload date:
- Size: 233.4 kB
- Tags: CPython 3.8
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5c349729ca7943f323fcc31f579c7f47ee5bbc6eef3eb3d3dc4f55ad0b82922
|
|
| MD5 |
c9ec62504fea1fdbfcaa867e330a3934
|
|
| BLAKE2b-256 |
32f3080552ccdfe8bfd651e6f71a00e56669225017d787610cf76d8d0b65c9c3
|
File details
Details for the file b64_stream-1.0.0-cp37-cp37m-manylinux2014_x86_64.whl.
File metadata
- Download URL: b64_stream-1.0.0-cp37-cp37m-manylinux2014_x86_64.whl
- Upload date:
- Size: 211.9 kB
- Tags: CPython 3.7m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
267c0b5fac3e2a603944a22f2176a6051bd3807a448102f9776f5495d1b5e1bc
|
|
| MD5 |
f18326304c3bb8d3eb0abce8f0ff4f1f
|
|
| BLAKE2b-256 |
65ad50679db361daf4ca1501a55c9c0052a65298eb8bbc939262b78dfb1c37b2
|
File details
Details for the file b64_stream-1.0.0-cp36-cp36m-manylinux2014_x86_64.whl.
File metadata
- Download URL: b64_stream-1.0.0-cp36-cp36m-manylinux2014_x86_64.whl
- Upload date:
- Size: 211.7 kB
- Tags: CPython 3.6m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa38528329bc77775c315ec310bfab9ac296d7bb30619e1f3706e13a3ac01671
|
|
| MD5 |
1fd53816252b8b9b1a89fd662aab542e
|
|
| BLAKE2b-256 |
d3251c357f1fd24c0e8a250afa45ecef2ddf2cd04bcfc8f45bdd00e28510c00c
|