Currently, the PHP extension for Zstandard (zstd) is missing the ZSTD_getFrameContentSize function, which is available in the underlying Zstandard library. This function is not only useful for determining the size of the original uncompressed data in a Zstandard-compressed frame but also for reliably whether the data is indeed compressed with Zstandard.
This could be added to help developers avoid errors like these, (during odd circumstances)
Warning: zstd_uncompress(): it was not compressed by zstd
Adding it would not only allow developers to determine the size of the original uncompressed data but also reliably detect whether the data is compressed with Zstandard, enhancing the usability and versatility of the PHP extension.
Version Info
PHP Version: 8.3.3
Extension Version | 0.13.1
Interface Version | 1.5.4
Currently, the PHP extension for Zstandard (zstd) is missing the ZSTD_getFrameContentSize function, which is available in the underlying Zstandard library. This function is not only useful for determining the size of the original uncompressed data in a Zstandard-compressed frame but also for reliably whether the data is indeed compressed with Zstandard.
This could be added to help developers avoid errors like these, (during odd circumstances)
Warning: zstd_uncompress(): it was not compressed by zstd
Adding it would not only allow developers to determine the size of the original uncompressed data but also reliably detect whether the data is compressed with Zstandard, enhancing the usability and versatility of the PHP extension.
Version Info
PHP Version: 8.3.3 Extension Version | 0.13.1 Interface Version | 1.5.4Thank you for your attention to this matter.