Click here to Skip to main content
15,890,557 members
Home / Discussions / C#
   

C#

 
GeneralRe: Sorting dates Pin
Dan Neely5-Jun-06 7:06
Dan Neely5-Jun-06 7:06 
GeneralRe: Sorting dates Pin
Yustme5-Jun-06 8:30
Yustme5-Jun-06 8:30 
GeneralRe: Sorting dates Pin
Dan Neely5-Jun-06 10:29
Dan Neely5-Jun-06 10:29 
GeneralRe: Sorting dates Pin
Josh Smith5-Jun-06 10:48
Josh Smith5-Jun-06 10:48 
AnswerRe: Sorting dates Pin
Dustin Metzgar5-Jun-06 6:10
Dustin Metzgar5-Jun-06 6:10 
QuestionHelp needed with string operation Pin
hasanali005-Jun-06 4:13
hasanali005-Jun-06 4:13 
AnswerRe: Help needed with string operation [modified] Pin
Wjousts5-Jun-06 4:52
Wjousts5-Jun-06 4:52 
QuestionProblem with GZipStream [modified] Pin
Dominik Reichl5-Jun-06 3:48
Dominik Reichl5-Jun-06 3:48 
Hello!

I am trying to use GZipStream to compress an XML file before writing it to disk. But unfortunately it doesn't work 100% correctly... The file written to disk is a valid GZ file up to the very last few bytes. The whole file can be decompressed without any problems, except that the very last few bytes are broken and get decompressed incorrectly...

My code basically looks like this:

FileStream fs = new FileStream(strFilePath, FileMode.Create, FileAccess.Write, FileShare.None);
Stream writerStream = new GZipStream(fs, CompressionMode.Compress);

XmlTextWriter xtw = new XmlTextWriter(writerStream, Encoding.UTF8);
WriteDocument(xtw); // Creates the XML document

xtw.Flush();
writerStream.Flush();
fs.Flush(); fs.Close();


Files mostly get decompressed incorrectly like this (_ are spaces):
________</Group>
____</Group>
</Root>
</SplConfFile5ile5ile5ile5ile5ile5ile5ile5ile5ile5ile5ile5ile5ile5ile5il


Do you have any idea what could be the problem? Why are the very last few bytes corrupted?

Best regards
Dominik



_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do?? Wink | ;)
(doesn't work on NT)

AnswerRe: Problem with GZipStream [modified] Pin
Dominik Reichl5-Jun-06 6:11
Dominik Reichl5-Jun-06 6:11 
QuestionTextBox language !! Pin
Tamimi - Code5-Jun-06 3:35
Tamimi - Code5-Jun-06 3:35 
AnswerRe: TextBox language !! Pin
Josh Smith5-Jun-06 3:45
Josh Smith5-Jun-06 3:45 
QuestionVOIP integration Pin
ante.mihalj5-Jun-06 2:40
ante.mihalj5-Jun-06 2:40 
AnswerRe: Assembly Pin
Colin Angus Mackay5-Jun-06 4:05
Colin Angus Mackay5-Jun-06 4:05 
Questionhowto disable sort in datagridview ? Pin
cmpeng345-Jun-06 1:47
cmpeng345-Jun-06 1:47 
AnswerRe: howto disable sort in datagridview ? Pin
albCode5-Jun-06 3:02
albCode5-Jun-06 3:02 
GeneralMessage Closed Pin
5-Jun-06 3:07
cmpeng345-Jun-06 3:07 
GeneralRe: howto disable sort in datagridview ? Pin
albCode5-Jun-06 3:28
albCode5-Jun-06 3:28 
GeneralMessage Closed Pin
5-Jun-06 3:47
cmpeng345-Jun-06 3:47 
GeneralRe: howto disable sort in datagridview ? Pin
albCode5-Jun-06 4:10
albCode5-Jun-06 4:10 
QuestionRe: howto disable sort in datagridview ? Pin
iswoolley20-Jun-06 5:00
iswoolley20-Jun-06 5:00 
Questionsignature of a file [modified] Pin
Mahmood Ilyas5-Jun-06 1:19
Mahmood Ilyas5-Jun-06 1:19 
AnswerRe: signature of a file Pin
Ed.Poore5-Jun-06 1:33
Ed.Poore5-Jun-06 1:33 
Questionantispyware Pin
Mahmood Ilyas5-Jun-06 1:12
Mahmood Ilyas5-Jun-06 1:12 
AnswerRe: antispyware Pin
Wjousts5-Jun-06 4:55
Wjousts5-Jun-06 4:55 
GeneralRe: antispyware Pin
led mike5-Jun-06 5:55
led mike5-Jun-06 5:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.