Timeline for Binary (de)serialization in c++
Current License: CC BY-SA 4.0
7 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Feb 19, 2023 at 17:04 | comment | added | G. Sliepen |
No problem! It's good to hear that my suggestions improved your code. Consider posting the refactored code as a new question on Code Review. It would also be interesting to see how you implemented BINARYIO_DEFINE_FIELDS and swap_if_needed_in_place().
|
|
| Feb 19, 2023 at 17:03 | comment | added | Nitram | Found out that I just had to update on my end, so please ignore that part about C++23 not being available. | |
| Feb 19, 2023 at 16:49 | comment | added | Nitram |
I just wanted to say thanks for the feedback. Refactoring it to use streams instead makes the code much more streamlined, although I can't test it with std::spanstream since C++23 doesn't seem to be available yet (please correct me if I'm wrong). I also would like to point out that reading straight into the vector data was about 2x faster that what I was doing before.
|
|
| Feb 18, 2023 at 0:02 | vote | accept | Nitram | ||
| Feb 16, 2023 at 22:14 | comment | added | G. Sliepen |
I don't see a definition of that macro, nor of swap_if_needed_in_place(), so I had to guess.
|
|
| Feb 16, 2023 at 21:39 | comment | added | Nitram |
The way it deals with endianness is with the BINARYIO_DEFINE_FIELDS macro, which exposes every field passed to it so that it can automatically check the size and and swap accordingly.
|
|
| Feb 16, 2023 at 12:37 | history | answered | G. Sliepen | CC BY-SA 4.0 |