I have been looking at the best way of doing this but can't find a solution that doesn't involve using bytes array.
Basically I want to wrap a XmlTextWriter in a GZipStream so I produce a GZipped Xml file.
I have been trying this:
Expand|Select|Wrap|Line Numbers
- using (GZipStream gzipout = new GZipStream(File.Create(Path), CompressionMode.Compress))
- {
- XmlTextWriter xtw = new XmlTextWriter(gzipout, Encoding.UTF8);
- ... [write elements and attributes, etc]
- }
Please give your thoughts,
Thanks,