Skip to content

0.5.0

Pre-release
Pre-release

Choose a tag to compare

@dktapps dktapps released this 07 Sep 12:38
· 25 commits to master since this release
c37ca7c

Warning

This extension is still under development. I don't recommend depending on it for production usage.

Also, please note that the API may still change again before the 1.0.0 release.

Changes since 0.4.1

  • Introduced array-of-type encoder and decoder functions for short, int, long, double and float types (BE, LE and Varint). These functions are 2-4x faster than encoding/decoding single elements with loops. Needless to say, they're also significantly faster than legacy code using BinaryStream.
  • ByteBuffer has been split into ByteBufferReader and ByteBufferWriter parts.
    • ByteBufferReader requires a string in the constructor and puts its offset at the start.
    • ByteBufferWriter does not require anything (but can be given a starting string) and puts its offset at the end.
  • Increased test coverage to verify symmetry of all encode/decode methods
  • VarInts are now tested against known binary values to ensure parity with pocketmine/binaryutils
  • Added BE and LE methods for UnsignedLong. Note that these still technically return signed longs, since PHP doesn't have an unsigned type; however, these allow code to be more self-documenting when e.g. implementing a protocol.