Boost logo

Boost Users :

Subject: [Boost-users] [Serialization] fast binary objects in portable archive
From: Stepan Hrbek (dee_at_[hidden])
Date: 2010-05-04 14:15:58


Hello,

my goal is fast portable serialization when 95% of data is in large
binary objects.

1)
binary_archive is fast, but nonportable.

2)
text_archive is portable, but ~50x slower.

3)
portable_binary_archive looks like solution, but I'm not able to use it
to serialize by pointer. Problem can be demonstrated in
demo_portable_archive.cpp of boost 1.42 by changing "char c;" to "A* c;"
and "c(std::rand())" to "c(0)".
Errors from VS2008 linker look like
error LNK2019: unresolved external symbol "public: static class
boost::archive::detail::basic_serializer const * __cdecl
boost::archive::detail::archive_serializer_map<class
portable_binary_iarchive>::find(class
boost::serialization::extended_type_info const &)"
(?find@?$archive_serializer_map_at_Vportable_binary_iarchive@@@detail_at_archive@boost@@SAPBVbasic_serializer_at_234@ABVextended_type_info_at_serialization@4@@Z)
referenced in function "public: static class
boost::archive::detail::basic_pointer_iserializer const * __cdecl
boost::archive::detail::load_pointer_type<class
portable_binary_iarchive>::find(class
boost::serialization::extended_type_info const &)"
(?find@?$load_pointer_type_at_Vportable_binary_iarchive@@@detail_at_archive@boost@@SAPBVbasic_pointer_iserializer_at_234@ABVextended_type_info_at_serialization@4@@Z)
demo_portable_archive.obj
Any idea how to fix it?

4)
Is it possible to override text_archive to process binary objects
faster, without converting them to text?

Stepan


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net