Click here to Skip to main content
15,899,634 members
Home / Discussions / C#
   

C#

 
AnswerRe: Disable Windows Navigation Pin
Emmanuel Medina18-Jul-13 5:27
professionalEmmanuel Medina18-Jul-13 5:27 
GeneralRe: Disable Windows Navigation Pin
aymen Tn18-Jul-13 22:44
aymen Tn18-Jul-13 22:44 
GeneralRe: Disable Windows Navigation Pin
Freak3018-Jul-13 23:46
Freak3018-Jul-13 23:46 
GeneralRe: Disable Windows Navigation Pin
Eddy Vluggen19-Jul-13 0:26
professionalEddy Vluggen19-Jul-13 0:26 
QuestionHow to save web page as MHTML? Pin
Abdallah Al-Dalleh18-Jul-13 3:25
Abdallah Al-Dalleh18-Jul-13 3:25 
AnswerRe: How to save web page as MHTML? Pin
Emmanuel Medina18-Jul-13 4:00
professionalEmmanuel Medina18-Jul-13 4:00 
AnswerRe: How to save web page as MHTML? Pin
Jay Nardev18-Jul-13 19:21
Jay Nardev18-Jul-13 19:21 
QuestionDynamic Columns in Entity Framework Pin
sengottuvel m18-Jul-13 2:28
sengottuvel m18-Jul-13 2:28 
AnswerRe: Dynamic Columns in Entity Framework Pin
Richard MacCutchan18-Jul-13 3:15
mveRichard MacCutchan18-Jul-13 3:15 
Questionhow to execute a wrapped oracle procedures using C# Pin
M_MA18-Jul-13 0:36
M_MA18-Jul-13 0:36 
QuestionUsing Axis Media Control SDK with EMGU CV to do a C# Winform application. Pin
Ervin Loong17-Jul-13 23:10
Ervin Loong17-Jul-13 23:10 
QuestionHelp Regarding OPEN XML, Pin
meetnneel17-Jul-13 6:16
meetnneel17-Jul-13 6:16 
AnswerRe: Help Regarding OPEN XML, Pin
Dave Kreskowiak17-Jul-13 7:24
mveDave Kreskowiak17-Jul-13 7:24 
GeneralRe: Help Regarding OPEN XML, Pin
BillWoodruff17-Jul-13 17:25
professionalBillWoodruff17-Jul-13 17:25 
GeneralRe: Help Regarding OPEN XML, Pin
Dave Kreskowiak17-Jul-13 18:00
mveDave Kreskowiak17-Jul-13 18:00 
GeneralRe: Help Regarding OPEN XML, Pin
BillWoodruff17-Jul-13 18:11
professionalBillWoodruff17-Jul-13 18:11 
GeneralRe: Help Regarding OPEN XML, Pin
Dave Kreskowiak18-Jul-13 2:09
mveDave Kreskowiak18-Jul-13 2:09 
AnswerRe: Help Regarding OPEN XML, Pin
BillWoodruff17-Jul-13 17:28
professionalBillWoodruff17-Jul-13 17:28 
QuestionUsing Binary Serialization and GZip ? Pin
BillWoodruff17-Jul-13 3:14
professionalBillWoodruff17-Jul-13 3:14 
AnswerRe: Using Binary Serialization and GZip ? Pin
Richard Deeming17-Jul-13 4:02
mveRichard Deeming17-Jul-13 4:02 
GeneralRe: Using Binary Serialization and GZip ? Pin
BillWoodruff17-Jul-13 15:07
professionalBillWoodruff17-Jul-13 15:07 
Richard, thanks very much for your example !

Your deserialization code is one of the first variations I tried, and it fails to deserialize with an error: "The magic number in GZip header is not correct. Make sure you are passing in a GZip stream."

Clearly my Gzipping is not being done properly. This is confirmed by this experiement: if I modify your code like this:
C#
using (var fileStream = File.OpenRead(filePath))
using (var deCompressionStream = new GZipStream(fileStream, CompressionMode.Decompress))
{
    var bFormatter = new BinaryFormatter();

    // put a break-point here: examine obj
    // this works !
    object obj = bFormatter.Deserialize(fileStream);

    // for testing only
    return null;
}
That confirms to me I did not GZip properly.

I tried several variations of GZipping found on MSDN, and StackOverFlow: almost all these examples use source.CopyTo(destination) in some form, within the using statements bracketing the use of GZipStream, evidently for the reason there is a known problem with GZipping not being completed fully until after it exits the 'using statement closure, as referenced here: [^].

So, the burden shifts back to finding the correct way for Gzipping.

thanks again for your time, Bill
AnswerRe: Using Binary Serialization and GZip ? Pin
Eddy Vluggen17-Jul-13 5:07
professionalEddy Vluggen17-Jul-13 5:07 
GeneralRe: Using Binary Serialization and GZip ? Pin
BillWoodruff17-Jul-13 16:52
professionalBillWoodruff17-Jul-13 16:52 
GeneralRe: Using Binary Serialization and GZip ? Pin
Eddy Vluggen18-Jul-13 6:32
professionalEddy Vluggen18-Jul-13 6:32 
GeneralRe: Using Binary Serialization and GZip ? Pin
BillWoodruff18-Jul-13 17:00
professionalBillWoodruff18-Jul-13 17:00 

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.