b64-stream-1.0.0
توضیحات
Base64 stream encode/decode library
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | b64-stream-1.0.0 |
| نام | b64-stream |
| نسخه کتابخانه | 1.0.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Ivan Krivosheev |
| ایمیل نویسنده | py.krivosheev@gmail.com |
| آدرس صفحه اصلی | https://github.com/ikrivosheev/py-base64 |
| آدرس اینترنتی | https://pypi.org/project/b64-stream/ |
| مجوز | Apache 2 |
[](https://pypi.org/project/b64-stream)
[](https://pypi.org/project/b64-stream)
[](https://travis-ci.org/ikrivosheev/py-base64)
[](https://pypi.org/project/b64-stream/)
# b64-stream
**b64-stream** is a Python binding for the [b64-stream](https://github.com/ikrivosheev/base64).
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:
0. **\_\_init\_\_(buffer_size: int = 2000)** - **buffer_size** used by create buffer for **update** method for new encoded/decoded chunk.
1. **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
```python
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
```python
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.
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.5 | Python |
نحوه نصب
نصب پکیج whl b64-stream-1.0.0:
pip install b64-stream-1.0.0.whl
نصب پکیج tar.gz b64-stream-1.0.0:
pip install b64-stream-1.0.0.tar.gz