comment here

This commit is contained in:
ton
2023-03-18 20:03:34 +07:00
commit 4553a0a589
14513 changed files with 2685043 additions and 0 deletions

View File

@@ -0,0 +1 @@
pip

View File

@@ -0,0 +1,25 @@
BSD 2-Clause License
Copyright (c) 2017-2019, Matthieu Darbois
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@@ -0,0 +1,256 @@
Metadata-Version: 2.1
Name: pybase64
Version: 1.2.3
Summary: Fast Base64 encoding/decoding
Home-page: https://github.com/mayeut/pybase64
Author: Matthieu Darbois
License: BSD-2-Clause
Project-URL: Source, https://github.com/mayeut/pybase64
Project-URL: Tracker, https://github.com/mayeut/pybase64/issues
Project-URL: Documentation, https://pybase64.readthedocs.io/en/stable
Keywords: base64
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: C
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Requires-Python: >=3.6
Description-Content-Type: text/x-rst
License-File: LICENSE
Provides-Extra: test
Requires-Dist: pytest (>=5.0.0) ; extra == 'test'
.. SETUP VARIABLES
.. |license-status| image:: https://img.shields.io/badge/license-BSD%202--Clause-blue.svg
:target: https://github.com/mayeut/pybase64/blob/master/LICENSE
.. |pypi-status| image:: https://img.shields.io/pypi/v/pybase64.svg
:target: https://pypi.python.org/pypi/pybase64
.. |python-versions| image:: https://img.shields.io/pypi/pyversions/pybase64.svg
.. |rtd-status| image:: https://readthedocs.org/projects/pybase64/badge/?version=stable
:target: http://pybase64.readthedocs.io/en/stable/?badge=stable
:alt: Documentation Status
.. |gha-status| image:: https://github.com/mayeut/pybase64/workflows/Build%20and%20upload%20to%20PyPI/badge.svg
:target: https://github.com/mayeut/pybase64/actions?query=workflow%3A%22Build+and+upload+to+PyPI%22
.. |codecov-status| image:: https://codecov.io/gh/mayeut/pybase64/branch/master/graph/badge.svg
:target: https://codecov.io/gh/mayeut/pybase64/branch/master
.. END OF SETUP
Fast Base64 implementation
==========================
|license-status| |pypi-status| |python-versions| |rtd-status| |gha-status| |codecov-status|
This project is a wrapper on `libbase64 <https://github.com/aklomp/base64>`_.
It aims to provide a fast base64 implementation for base64 encoding/decoding.
Installation
============
.. code::
pip install pybase64
Usage
=====
``pybase64`` uses the same API as Python base64 "modern interface" (introduced in Python 2.4) for an easy integration.
To get the fastest decoding, it is recommended to use the ``pybase64.b64decode`` and ``validate=True`` when possible.
.. code:: python
import pybase64
print(pybase64.b64encode(b'>>>foo???', altchars='_:'))
# b'Pj4_Zm9vPz8:'
print(pybase64.b64decode(b'Pj4_Zm9vPz8:', altchars='_:', validate=True))
# b'>>>foo???'
# Standard encoding helpers
print(pybase64.standard_b64encode(b'>>>foo???'))
# b'Pj4+Zm9vPz8/'
print(pybase64.standard_b64decode(b'Pj4+Zm9vPz8/'))
# b'>>>foo???'
# URL safe encoding helpers
print(pybase64.urlsafe_b64encode(b'>>>foo???'))
# b'Pj4-Zm9vPz8_'
print(pybase64.urlsafe_b64decode(b'Pj4-Zm9vPz8_'))
# b'>>>foo???'
.. begin cli
A command-line tool is also provided. It has encode, decode and benchmark subcommands.
.. code::
usage: pybase64 [-h] [-V] {benchmark,encode,decode} ...
pybase64 command-line tool.
positional arguments:
{benchmark,encode,decode}
tool help
benchmark -h for usage
encode -h for usage
decode -h for usage
optional arguments:
-h, --help show this help message and exit
-V, --version show program's version number and exit
.. end cli
Full documentation on `Read the Docs <http://pybase64.readthedocs.io/en/stable/?badge=stable>`_.
Benchmark
=========
.. begin benchmark
Running Python 3.7.2, Apple LLVM version 10.0.0 (clang-1000.11.45.5), Mac OS X 10.14.2 on an Intel Core i7-4870HQ @ 2.50GHz
.. code::
pybase64 0.5.0 (C extension active - AVX2)
bench: altchars=None, validate=False
pybase64._pybase64.encodebytes: 1734.776 MB/s (13,271,472 bytes -> 17,928,129 bytes)
pybase64._pybase64.b64encode: 4039.539 MB/s (13,271,472 bytes -> 17,695,296 bytes)
pybase64._pybase64.b64decode: 1854.423 MB/s (17,695,296 bytes -> 13,271,472 bytes)
base64.encodebytes: 78.352 MB/s (13,271,472 bytes -> 17,928,129 bytes)
base64.b64encode: 539.840 MB/s (13,271,472 bytes -> 17,695,296 bytes)
base64.b64decode: 287.826 MB/s (17,695,296 bytes -> 13,271,472 bytes)
bench: altchars=None, validate=True
pybase64._pybase64.b64encode: 4156.607 MB/s (13,271,472 bytes -> 17,695,296 bytes)
pybase64._pybase64.b64decode: 4107.997 MB/s (17,695,296 bytes -> 13,271,472 bytes)
base64.b64encode: 559.342 MB/s (13,271,472 bytes -> 17,695,296 bytes)
base64.b64decode: 143.674 MB/s (17,695,296 bytes -> 13,271,472 bytes)
bench: altchars=b'-_', validate=False
pybase64._pybase64.b64encode: 2786.776 MB/s (13,271,472 bytes -> 17,695,296 bytes)
pybase64._pybase64.b64decode: 1124.136 MB/s (17,695,296 bytes -> 13,271,472 bytes)
base64.b64encode: 322.427 MB/s (13,271,472 bytes -> 17,695,296 bytes)
base64.b64decode: 205.195 MB/s (17,695,296 bytes -> 13,271,472 bytes)
bench: altchars=b'-_', validate=True
pybase64._pybase64.b64encode: 2806.271 MB/s (13,271,472 bytes -> 17,695,296 bytes)
pybase64._pybase64.b64decode: 2740.456 MB/s (17,695,296 bytes -> 13,271,472 bytes)
base64.b64encode: 314.709 MB/s (13,271,472 bytes -> 17,695,296 bytes)
base64.b64decode: 121.803 MB/s (17,695,296 bytes -> 13,271,472 bytes)
.. end benchmark
.. begin changelog
Changelog
=========
1.2.3
-----
- Update base64 library
- Publish python 3.11 wheels
1.2.2
-----
- Update base64 library
- Fix C extension build on musl distros
- Publish musllinux wheels
1.2.1
-----
- Publish PyPy 3.8 (pypy38_pp73) wheels
1.2.0
-----
- Release the GIL
- Publish CPython 3.10 wheels
- Drop python 3.5 support
1.1.4
-----
- Add macOS arm64 wheel
1.1.3
-----
- GitHub Actions: fix build on tag
1.1.2
-----
- Add PyPy wheels
- Add aarch64, ppc64le & s390x manylinux wheels
1.1.1
-----
- Move CI from TravisCI/AppVeyor to GitHub Actions
- Fix publication of Linux/macOS wheels
1.1.0
-----
- Add b64encode_as_string, same as b64encode but returns a str object instead of a bytes object
- Add b64decode_as_bytearray, same as b64decode but returns a bytarray object instead of a bytes object
- Speed-Up decoding from UCS1 strings
1.0.2
-----
- Update base64 library
- Publish python 3.9 wheels
1.0.1
-----
- Publish python 3.8 wheels
1.0.0
-----
- Drop python 3.4 support
- Drop python 2.7 support
0.5.0
-----
- Publish python 3.7 wheels
- Drop python 3.3 support
0.4.0
-----
- Speed-up decoding when validate==False
0.3.1
-----
- Fix deployment issues
0.3.0
-----
- Add encodebytes function
0.2.1
-----
- Fixed invalid results on Windows
0.2.0
-----
- Added documentation
- Added subcommands to the main script:
* help
* version
* encode
* decode
* benchmark
0.1.2
-----
- Updated base64 native library
0.1.1
-----
- Fixed deployment issues
0.1.0
-----
- First public release
.. end changelog

View File

@@ -0,0 +1,30 @@
../../../bin/pybase64,sha256=Rdhx1-dzYIe36enJUN8kSsN6MNs4BWb1lJXzVnr8pYw,260
pybase64-1.2.3.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
pybase64-1.2.3.dist-info/LICENSE,sha256=RP2DwnOcCfIYFGMFQKdF4D1yJ1wEM18Gjv13xuN5YLs,1326
pybase64-1.2.3.dist-info/METADATA,sha256=R3D_ierCy5P90f6I7MftQJ6K08oPyJBiy1a4g1t7JYQ,7586
pybase64-1.2.3.dist-info/RECORD,,
pybase64-1.2.3.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pybase64-1.2.3.dist-info/WHEEL,sha256=lVPXYH8LMHYHuLy0p0zNneWNEw-dpoJ5k5Tb3b38QMM,225
pybase64-1.2.3.dist-info/entry_points.txt,sha256=qLhLeuPRnj6ju76SqeVYOuxavmDKx9ZWjXHLltpLa5o,52
pybase64-1.2.3.dist-info/top_level.txt,sha256=Tm3tmGpMnLWAvjrxORS2E5I6LARaLepOEUjGaTmFuZg,9
pybase64/__init__.py,sha256=QUq2ZLe6swk4qskNWSW8zh9lT0xw5_1ayzE_tff3yUk,3683
pybase64/__main__.py,sha256=aounRGRnqDrI2mXE3wzXyAPy1S9IeCDd1td_72lGJCc,7910
pybase64/__pycache__/__init__.cpython-311.pyc,,
pybase64/__pycache__/__main__.cpython-311.pyc,,
pybase64/__pycache__/_fallback.cpython-311.pyc,,
pybase64/__pycache__/_license.cpython-311.pyc,,
pybase64/__pycache__/_version.cpython-311.pyc,,
pybase64/_fallback.py,sha256=Ddx9OWEzNB72SnC516Pixa4bavLeIzuppcHiDgPBbtk,5228
pybase64/_license.py,sha256=h8LMmemWIMTvTIW6m-xMgw4DzJY7i1TwVrKB4JiY_p4,3115
pybase64/_pybase64.cpython-311-x86_64-linux-gnu.so,sha256=v3t_fsdUGFoIfEMe9lBztYvHwO43wVEQIiKtGGgMKnI,753568
pybase64/_version.py,sha256=C-D_WWrVkBDmQmApLcm0sWNh2CgIrwWfc8_sB5vvU-Q,22
pybase64/distutils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pybase64/distutils/__pycache__/__init__.cpython-311.pyc,,
pybase64/distutils/__pycache__/ccompilercapabilities.cpython-311.pyc,,
pybase64/distutils/ccompilercapabilities.py,sha256=9JE7xeJZz9NObLHjA0VtuJutU9vVroMrWpKNGLww9KE,6972
pybase64/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pybase64/tests/__pycache__/__init__.cpython-311.pyc,,
pybase64/tests/__pycache__/test_main.cpython-311.pyc,,
pybase64/tests/__pycache__/test_pybase64.cpython-311.pyc,,
pybase64/tests/test_main.py,sha256=jTLkn8VViuLeZBs0cU9a8UVYRgMkupZLy1zc_6mDCjc,3726
pybase64/tests/test_pybase64.py,sha256=6UGy20caLeE1Ma_o5V4yH2EcWj78UGYwo84eCckSs2g,11752

View File

@@ -0,0 +1,8 @@
Wheel-Version: 1.0
Generator: bdist_wheel (0.37.1)
Root-Is-Purelib: false
Tag: cp311-cp311-manylinux_2_5_x86_64
Tag: cp311-cp311-manylinux1_x86_64
Tag: cp311-cp311-manylinux_2_17_x86_64
Tag: cp311-cp311-manylinux2014_x86_64

View File

@@ -0,0 +1,2 @@
[console_scripts]
pybase64 = pybase64.__main__:main

View File

@@ -0,0 +1 @@
pybase64