Download the PHP package gabrielelana/byte-units without Composer
On this page you can find all versions of the php package gabrielelana/byte-units. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gabrielelana/byte-units
More information about gabrielelana/byte-units
Files in gabrielelana/byte-units
Package byte-units
Short Description Library to parse, format and convert byte units
License MIT
Homepage https://github.com/gabrielelana/byte-units
Informations about the package byte-units
Byte Units
This is a utility component for parsing, formatting, converting and manipulating byte units in various formats.
Usage
Parsing
Right now two unit systems are supported:
- The
Metric
system that is based on a 1000-byte kilobyte and uses standard SI suffixes (kB
,MB
,GB
,TB
,PB
, …) - The
Binary
system that is based on a 1024-byte kilobyte and uses binary suffixes (KiB
,MiB
,GiB
,TiB
,PiB
, …)
Formatting
In both systems you can format bytes with an appropriate format string
Compare
There are a few methods that could be used to compare bytes in various units and systems
Manipulate
Also you can add or remove bytes in various units and systems
Auto Boxing
Most of the methods can take integers or strings and box them to appropriate byte units
Installation via Composer
-
Install Composer to your project root:
-
Add a
composer.json
file to your project: - Run the Composer installer:
Self-Promotion
If you like this project, then consider to:
All versions of byte-units with dependencies
ext-bcmath Version *