You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Revert "PalettedBlockArray: allow getting and providing palette as raw bytes, instead of an array" and related commits
It turns out this is only useful if we want to preserve the bytes for
direct reuse later. We don't really want to do this as discussed in
pmmp/PocketMine-MP#6786. When the data must be decomposed into integers,
transformed and repacked to binary, getting the data as binary first is
actually worse for performance (assuming that ByteBufferReader is used).
So it looks like we're stuck with arrays, for better or worse :(
This reverts commit 8e83c8d.
This reverts commit 5614724.
This reverts commit a26bed6.
if ((ZSTR_LEN(paletteZstr) % sizeof(Block)) != 0) {
60
-
zend_throw_exception_ex(exception_ce, 0, "palette length in bytes must be a multiple of %zu, but have %zu bytes", sizeof(Block), ZSTR_LEN(paletteZstr));
61
-
returnfalse;
62
-
}
63
-
64
-
auto paletteEntries = ZSTR_LEN(paletteZstr) / sizeof(Block);
0 commit comments