Topic: [Igbinary] How to unserialize igbinary in C++ project
Firstly, I admire you very much and thanks for you share of igbinary lib.
And my problem is how to unserialiize igbinary in C++ project? Thanks for you help.
You are not logged in. Please login or register.
Please STOP WAR NOW! | |
For proper configuration and installation, please use the Configuration Wizard |
Versions: PHP ≤ 8.0 is EOL - PHP 8.1.28 - PHP 8.2.18 - PHP 8.3.6
More information: #remirepo IRC channel - Twitter: @RemiRepository - Discord server
Remi's RPM repository - Forum → User support → [Igbinary] How to unserialize igbinary in C++ project
Firstly, I admire you very much and thanks for you share of igbinary lib.
And my problem is how to unserialiize igbinary in C++ project? Thanks for you help.
Sorry, but I don't really understand your question.
igbinary is only a PHP extension, doesn't make sense for other language.
Anotther PHP extension can, of course, use its public API (see igbinary.h)
IGBINARY_API int igbinary_serialize(uint8_t **ret, size_t *ret_len, zval *z TSRMLS_DC);
IGBINARY_API int igbinary_serialize_ex(uint8_t **ret, size_t *ret_len, zval *z, struct igbinary_memory_manager *memory_manager TSRMLS_DC);
IGBINARY_API int igbinary_unserialize(const uint8_t *buf, size_t buf_len, zval *z TSRMLS_DC);
Thanks for your reply. My scene is our product logic involving multiple teams. Team A use php extension igbinary to insert data into redis. Then Team B want to read data from redis in C++ module. Is it feasible for Team B?
So, Team B need unserialize igbinary in C++ module. Could you give me some suggestion. Thanks.
Sorry, I can't really help you, but probably you should investigate on another serializer, json is probably the most portable, msgpack could also be interesting (as, AFAIK, it is available for various languages). I really think igbinary is not suitable for such cross-languages needs.
Remi, thanks.
Because the serialize algorithm and the unserialize algorithm are in different teams . I cannot drive the serialize team upgrade their algorithm. At the same time, I cannot migrate my team source code from C++ to PHP.
Is there any other ideas to implement unserialize algorithm in C++ project, such as modify the igbinary.c source code. And How big is the cost for me? Thanks again.
> such as modify the igbinary.c source code
Everything is doable, but this code is design to create PHP variables (ZVAL = scalar, array or object)
> And How big is the cost for me ?
No idea.
Remi's RPM repository - Forum → User support → [Igbinary] How to unserialize igbinary in C++ project
Generated in 0.005 seconds (61% PHP - 39% DB) with 10 queries
Powered by PunBB, supported by Informer Technologies, Inc.
Currently installed 2 official extensions. Copyright © 2003–2009 PunBB.