Releases: pmmp/ext-encoding
Releases · pmmp/ext-encoding
0.3.0
⚠️ This extension is still experimental. DO NOT use this in production.
Changes since 0.2.x
API changes
ByteBuffer
now has separate offsets for read and write. This allows it to more closely mimic the behaviour ofBinaryStream
, which implicitly has separate offsets (BinaryStream->getOffset()
is only used for reading; writing just appends to the internal string)- Added
ByteBuffer->getReadOffset()
- Added
ByteBuffer->setReadOffset()
- Added
ByteBuffer->getWriteOffset()
- Added
ByteBuffer->setWriteOffset()
- Removed
ByteBuffer->getOffset()
- Removed
ByteBuffer->setOffset()
- Removed
ByteBuffer->rewind()
(usesetReadOffset(0)
orsetWriteOffset(0)
depending on your use case)
- Added
- Renamed
ByteBuffer->getReserved()
->ByteBuffer->getReservedLength()
- Added
ByteBuffer->getUsedLength()
- Added
ByteBuffer->clear()
Other changes
- Now tested on PHP 8.3
- All non-macro-generated API methods are now in an internal
BaseByteBuffer
class, to allow as much of the arginfo as possible to be generated by PHP'sgen-stub.php
.ByteBuffer
extendsBaseByteBuffer
and there is no observable change toByteBuffer
API and behaviour from this change.
0.2.3
0.2.2
0.2.1
0.2.0
⚠️ This extension is still experimental. DO NOT use this in production.
Changes since 0.1.0
- All classes have moved to the
pmmp\encoding
namespace new ByteBuffer
can now be called with no arguments- Added read/write methods for signed and unsigned int24
- Removed read/write for unsigned long - these made no sense as it's not possible to return an unsigned int64 to PHP code
- Fixed UAF after
var_dump
ing orserialize
ing aByteBuffer
- Fixed uninitialized memory being emitted in
var_dump
andserialize
d data - Removed
?int &$offset
parameters from all functions - these uses can be better filled withgetOffset
andsetOffset
- Added a whole bunch of new unit tests