Download the PHP package tuupola/base85 without Composer
On this page you can find all versions of the php package tuupola/base85. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tuupola/base85
More information about tuupola/base85
Files in tuupola/base85
Package base85
Short Description Base85 encoder and decoder for arbitrary data
License MIT
Homepage https://github.com/tuupola/base85
Informations about the package base85
All your Base85
Install
Install with composer.
This branch requires PHP 7.1 or up. The older 1.x branch supports also PHP 5.6 and 7.0.
Usage
This package has both pure PHP and GMP based encoders. By default encoder and decoder will use GMP functions if the extension is installed. If GMP is not available pure PHP encoder will be used instead.
If you are encoding to and from integer use the implicit decodeInteger()
and encodeInteger()
methods.
Note that encoding a string and an integer will yield different results.
Encoding modes
ASCII85 encoding. This is the default. 0x00000000
is compressed to z
. Spaces are not compressed.
Adobe ASCII85 encoding is same as previous except data is enclosed between <~
and ~>
.
ZeroMQ (Z85) encoding. NOTE! Even though specification says input length must be divisible by 4, this is not currently enforced. Spaces and zeroes are not compressed.
Character set from RFC1924 which is an April fools joke. Spaces and zeroes are not compressed.
Speed
Pure PHP encoder seems to be faster than the GMP implementation. Below benchmarks use random_bytes(128)
as data.
Static Proxy
If you prefer static syntax use the provided static proxy.
To change static proxy options set the Base85::$options
variable.
Testing
You can run tests either manually or automatically on every code change. Automatic tests require entr to work.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
License
The MIT License (MIT). Please see License File for more information.