Skip to main content

Base64 stream encode/decode library

Project description

Version Python versions Build Status License

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:

  1. Base64StreamDecode
  2. Base64StreamEncode

Every class has:

  1. __init__(buffer_size: int = 2000) - buffer_size used by create buffer for update method for new encoded/decoded chunk.
  2. buffer_size - size of buffer
  3. total - total encoded/decoded bytes
  4. clear() - reset state to initial
  5. update(chunk) - processing chunk
  6. 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


Download files

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

Source Distribution

b64-stream-1.0.0.tar.gz (70.7 kB view details)

Uploaded Source

Built Distributions

b64_stream-1.0.0-cp38-cp38-manylinux2014_x86_64.whl (233.4 kB view details)

Uploaded CPython 3.8

b64_stream-1.0.0-cp37-cp37m-manylinux2014_x86_64.whl (211.9 kB view details)

Uploaded CPython 3.7m

b64_stream-1.0.0-cp36-cp36m-manylinux2014_x86_64.whl (211.7 kB view details)

Uploaded CPython 3.6m

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

Hashes for b64-stream-1.0.0.tar.gz
Algorithm Hash digest
SHA256 fb3356d80dc99ffd5a86e5948eae2f6f6a50cc2a4ac3954cf8f8ae4bec6bbb29
MD5 9b2d543a1afc660558a96c554c38bc5f
BLAKE2b-256 ed4706f2dc16a9932d8f7596be35323ffa7514dbfe325316baf3f6ca16c42d73

See more details on using hashes here.

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

Hashes for b64_stream-1.0.0-cp38-cp38-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f5c349729ca7943f323fcc31f579c7f47ee5bbc6eef3eb3d3dc4f55ad0b82922
MD5 c9ec62504fea1fdbfcaa867e330a3934
BLAKE2b-256 32f3080552ccdfe8bfd651e6f71a00e56669225017d787610cf76d8d0b65c9c3

See more details on using hashes here.

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

Hashes for b64_stream-1.0.0-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 267c0b5fac3e2a603944a22f2176a6051bd3807a448102f9776f5495d1b5e1bc
MD5 f18326304c3bb8d3eb0abce8f0ff4f1f
BLAKE2b-256 65ad50679db361daf4ca1501a55c9c0052a65298eb8bbc939262b78dfb1c37b2

See more details on using hashes here.

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

Hashes for b64_stream-1.0.0-cp36-cp36m-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 aa38528329bc77775c315ec310bfab9ac296d7bb30619e1f3706e13a3ac01671
MD5 1fd53816252b8b9b1a89fd662aab542e
BLAKE2b-256 d3251c357f1fd24c0e8a250afa45ecef2ddf2cd04bcfc8f45bdd00e28510c00c

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