Skip to content

Releases: elephant-php/byte-size

0.2.0

11 May 23:43

Choose a tag to compare

Added

Added ByteSizeUnit enum for explicit unit formatting
Added alias factory methods: bytes(), kb(), mb(), gb(), tb()
Added alias conversion methods: toKb(), toMb(), toGb(), toTb()
Added human() for automatic human-readable file size formatting
Added tests for aliases, boundary cases, and real filesystem usage with filesize()

Changed

Switched the library to 1024-based file size conversion
Refined ByteSize to model bytes as an integer value internally
Conversion methods now return raw converted values without formatting-side rounding
Centralized output rounding and formatting inside format() and human()
Improved and simplified the README with updated examples and real-world usage
Notes
ByteSize is now focused on practical file size conversion and formatting
Если хочешь более короткую версию для CHANGELOG.md, можно так:

0.2.0

Switched to 1024-based file size conversion
Added ByteSizeUnit
Added alias factory and conversion methods
Added human() and improved formatting behavior
Refined the internal model to store bytes as integers
Expanded test coverage and updated documentation

0.1.0

27 Apr 08:43

Choose a tag to compare

A small immutable PHP value object for byte-size conversion and formatting.