Boost logo

Boost Users :

Subject: Re: [Boost-users] Serialization cumulatively.
From: Nat Goodspeed (nat_at_[hidden])
Date: 2015-03-20 14:18:56

On Fri, Mar 20, 2015 at 10:37 AM, tcamuso <tcamuso_at_[hidden]> wrote:

> What I'd like to do, because i think it would be much faster, is to go
> through the one big file and deserialize each of those serializations as
> they are encountered. Early testing showed that it would only take a few
> minutes to integrate these pieces into one whole.

If there were some simple way for user code to recognize the end of an
archive, maybe you could interpose an input filter using
Boost.Iostreams. The filter would present EOF to its caller on
spotting the end of archive, but leave the underlying file open (with
its read pointer adjusted to immediately after the end of archive) for
the application to bind another instance of the same filter onto the
same underlying file.

> If there were linefeeds in the serialized data, the code to do this would be
> much simpler.

Maybe you could derive an archive type yourself from one of the
existing ones that differs only in appending an easily-recognizable
marker when finished writing?

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at