Boost logo

Boost Users :

From: Robert Ramey (ramey_at_[hidden])
Date: 2006-07-10 11:18:16


Joel de Guzman wrote:
> Peter Dimov wrote:
>> Joel de Guzman wrote:
>>> Peter Dimov wrote:

> There might be a possibility that Y is already obsolete at
> version 2. Sure you can "emulate" it through the proxy thing,
> but then again that's less than ideal. I simply want to skip
> some data and I can't do it with Boost.Serialization. I can
> do it with simple streams, for example, by prepending the data
> with a length (in bytes). I can also do it with XML by ignoring
> everything in between the current tag and its matching end tag.
> Rene (Rivera) noted that some archive types also allow it. For
> example, IFF (http://en.wikipedia.org/wiki/Interchange_File_Format)
> allows it through chunking. "Because the spec includes explicit
> lengths for each chunk, it is possible for a parser to skip over
> chunks which it either can't or doesn't care to process."

> IMO, this is a valid use case that Boost.Serialization can address,
> at least, for archive forms that allow it. Perhaps a SkippableArchive
> concept? IMO, the ability to skip is a prerequisite for transparent
> versioning.

It would be feasible to make an archive type which would support this.
(I believe xml archives could do it now.) But that would require
extra information in the archive that would otherwise be unnecessary.
Natually this would provoke howls of protest were it to be included
in every archive. So we're back to a "special purpose" archive
or archive adaptor which adds the extra information to every archive.
Of course this wouldn't help with version 1 archives which presumably
have already been written.

>> This is the only way that works reliably with any archive. :-) (And,
>> since the serialization library does not document its external
>> format, the only way that works reliably with it.)

The internal format of an archive is not documented - in fact its not
even defined by the archive concept. This is not an oversight
- it was a deliberate decision on my part specifically to permit extention
to cases like this one. Here - less IS more.

Robert Ramey


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