Boost logo

Boost Users :

From: Kevin Wheatley (hxpro_at_[hidden])
Date: 2006-04-13 05:35:20


Gareth Foster wrote:
> Cheers for any help, and code (pseudo or otherwise) would be great. Or
> just a yes or no you can/can't do that would be a start.

its possible, but you'll have to write a 'tar' filter to allow you to
extract the XML file, (Iostreams should already deal with the gzip).
If you only need to pick out a single file from an input stream, it
shouldn't be too hard to deal with. You'll 'just' have to parse the
tar headers till you match the file(s) you want, then pass them as the
output of your filter onto the next stage, which can be your XML
decoding/whatever.

dealing with the multiple files though depends on if your program
needs them 'in order' in some way, and if that order is the one the
external program writes the tar archive in, otherwise you'll want to
deal with rewindable stream or do a multiple pass algorithm or
something, but thats more an application issue.

Kevin

-- 
| Kevin Wheatley, Cinesite (Europe) Ltd | Nobody thinks this      |
| Senior Technology                     | My employer for certain |
| And Network Systems Architect         | Not even myself         |

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