Releases: pmmp/BinaryUtils
Releases · pmmp/BinaryUtils
0.2.6
0.2.5
0.2.4
Changes since 0.2.3
- Fixed
Binary::readBool()
returning incorrect results when more than 1 byte is given Binary::writeUnsignedVarInt()
andBinary::writeUnsignedVarLong()
no longer overwrite the parameter variable when encoding (avoids misleading backtrace outputs)
0.2.3
Changes since 0.2.2
- Fixed
Uninitialized string offset
inBinary::readByte()
andBinary::readSignedByte()
when given an empty string - it now throwsBinaryDataException
in that case instead. Binary::readShort()
,Binary::readInt()
,Binary::readLong()
,Binary::readFloat()
,Binary::readDouble()
and friends now throw exceptions with more useful messages containing the expected and actual lengths.- Added a bunch of missing
@throws BinaryDataException
. - Now tested on PHP 8.1.
0.2.2
0.2.1
Changes since 0.2.0
- Removed native property types in
BinaryStream
due to massive performance degradation (see https://bugs.php.net/bug.php?id=81090).
0.2.0
Changes since 0.1.x
- PHP 7.4 is now required as a minimum.
- A new
Limits
class has been added, which contains constants for the bounds of int8, int16, int32, int64, and their unsigned variants. BinaryStream
has the following changes:buffer
andoffset
fields are now protected.reset()
method has been removed (create a newBinaryStream
instead).setBuffer()
method has been removed (create a newBinaryStream
instead).get()
no longer acceptstrue
for the length. To get all the bytes left in the buffer, usegetRemaining()
instead.BIG_ENDIAN
andLITTLE_ENDIAN
constants have been removed.- All methods which return
void
now have nativevoid
typehints.
- The global constant
ENDIANNESS
has been removed. It's no longer needed for anything thanks to the introduction of non-machine-byte-order-dependentpack()
codes for floats in PHP 7.2.