TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Pierre
NA
1
0
GZipStream and XmlTextWriter
Jul 26 2007 7:41 AM
Hi All,
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:
using (GZipStream gzipout = new GZipStream(File.Create(Path), CompressionMode.Compress))
{
XmlTextWriter xtw = new XmlTextWriter(gzipout, Encoding.UTF8);
... [write elements and attributes, etc]
}
But I end up with a gzipped file of 4096 bytes and when I look into it my XML content is truncated. The thing is that my content length is really variable.
Please give your thoughts,
Thanks,
Reply
Answers (
0
)
GAC referencing incorrect version of assembly
How can i upload a file to another system?