Boost logo

Boost Users :

From: Joel de Guzman (joel_at_[hidden])
Date: 2006-07-10 11:32:12


Robert Ramey wrote:
> 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.

No, the "imaginary" version 1 file has not been written yet. I am
programming in the future tense :) I also believe that the XML
archive format *can* do it now, which is why I am asking ;) And,
as I mentioned, I'm particularly interested with XML; but I do
not want to subvert the Boost.Serialization interface.

Regards,

-- 
Joel de Guzman
http://www.boost-consulting.com
http://spirit.sf.net

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