Skip to content

Releases: pmmp/ext-encoding

0.3.0

02 Apr 14:52
f1cac6e
Compare
Choose a tag to compare
0.3.0 Pre-release
Pre-release

⚠️ 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 of BinaryStream, 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() (use setReadOffset(0) or setWriteOffset(0) depending on your use case)
  • 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's gen-stub.php. ByteBuffer extends BaseByteBuffer and there is no observable change to ByteBuffer API and behaviour from this change.

0.2.3

06 Nov 19:20
d123265
Compare
Choose a tag to compare
0.2.3 Pre-release
Pre-release

⚠️ This extension is still experimental. DO NOT use this in production.

Changes since 0.2.2

  • Unserializing a serialized ByteBuffer now works correctly

0.2.2

06 Nov 18:09
4929656
Compare
Choose a tag to compare
0.2.2 Pre-release
Pre-release

⚠️ This extension is still experimental. DO NOT use this in production.

Changes since 0.2.1

  • Cloning ByteBuffer now works correctly

0.2.1

02 Nov 16:52
cc92ed7
Compare
Choose a tag to compare
0.2.1 Pre-release
Pre-release

⚠️ This extension is still experimental. DO NOT use this in production.

Changes since 0.2.0

  • Added ByteBuffer->getUnreadLength()

0.2.0

27 Oct 17:03
c54cb79
Compare
Choose a tag to compare
0.2.0 Pre-release
Pre-release

⚠️ 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_dumping or serializeing a ByteBuffer
  • Fixed uninitialized memory being emitted in var_dump and serialized data
  • Removed ?int &$offset parameters from all functions - these uses can be better filled with getOffset and setOffset
  • Added a whole bunch of new unit tests

0.1.0

15 Feb 21:17
Compare
Choose a tag to compare
0.1.0 Pre-release
Pre-release

Initial release.

⚠️ This release is for the sake of checkpointing only. The extension is still considered highly experimental, and should not be relied on for production usage.

Once again: do NOT use this release in production!