Click here to Skip to main content
16,005,080 members
Home / Discussions / C#
   

C#

 
AnswerRe: help with code to implement a calculator.... Pin
Luc Pattyn1-Oct-07 4:55
sitebuilderLuc Pattyn1-Oct-07 4:55 
GeneralRe: help with code to implement a calculator.... Pin
MinhajuddinK1-Oct-07 7:32
MinhajuddinK1-Oct-07 7:32 
QuestionAmbiguous Date Format in Excel Pin
meeram3951-Oct-07 3:21
meeram3951-Oct-07 3:21 
AnswerRe: Ambiguous Date Format in Excel Pin
raja mohamed21-Jul-09 2:15
raja mohamed21-Jul-09 2:15 
QuestionSystem.IO.Compression Pin
Vodstok1-Oct-07 3:12
Vodstok1-Oct-07 3:12 
AnswerRe: System.IO.Compression Pin
TJoe1-Oct-07 3:16
TJoe1-Oct-07 3:16 
GeneralRe: System.IO.Compression Pin
Vodstok1-Oct-07 3:22
Vodstok1-Oct-07 3:22 
GeneralRe: System.IO.Compression Pin
TJoe1-Oct-07 3:25
TJoe1-Oct-07 3:25 
Assuming the compression is not expensive (e.g. you are only working with small streams), then you could simply code the method such that it tries to compress the data. Then it would compare the original size to the compressed size and if the compressed size is larger, then it saves the original data and trashes the compressed data. You would probably need to maintain a flag with the file that specifies whether you compressed it though.

Take care,
Tom

-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com

GeneralRe: System.IO.Compression Pin
Vodstok1-Oct-07 3:33
Vodstok1-Oct-07 3:33 
AnswerRe: System.IO.Compression Pin
Scott Dorman1-Oct-07 3:25
professionalScott Dorman1-Oct-07 3:25 
AnswerRe: System.IO.Compression Pin
Luc Pattyn1-Oct-07 5:03
sitebuilderLuc Pattyn1-Oct-07 5:03 
GeneralRe: System.IO.Compression Pin
Vodstok1-Oct-07 5:08
Vodstok1-Oct-07 5:08 
GeneralRe: System.IO.Compression Pin
Luc Pattyn1-Oct-07 5:59
sitebuilderLuc Pattyn1-Oct-07 5:59 
GeneralRe: System.IO.Compression Pin
Vodstok1-Oct-07 6:21
Vodstok1-Oct-07 6:21 
Questionindex server Pin
Sunil Wise1-Oct-07 3:09
professionalSunil Wise1-Oct-07 3:09 
AnswerRe: index server Pin
Andrei Ungureanu1-Oct-07 4:57
Andrei Ungureanu1-Oct-07 4:57 
Questionhow can update (edit) a node value in xml file ? Pin
B.A1-Oct-07 2:47
B.A1-Oct-07 2:47 
AnswerRe: how can update (edit) a node value in xml file ? Pin
il_masacratore1-Oct-07 3:47
il_masacratore1-Oct-07 3:47 
GeneralRe: how can update (edit) a node value in xml file ? Pin
B.A1-Oct-07 12:15
B.A1-Oct-07 12:15 
AnswerRe: how can update (edit) a node value in xml file ? Pin
B.A1-Oct-07 12:17
B.A1-Oct-07 12:17 
Questionchange password Pin
Sunil Wise1-Oct-07 2:23
professionalSunil Wise1-Oct-07 2:23 
AnswerRe: change password Pin
Colin Angus Mackay1-Oct-07 2:38
Colin Angus Mackay1-Oct-07 2:38 
QuestionSelf excutable file Pin
zafax_1-Oct-07 1:52
zafax_1-Oct-07 1:52 
AnswerRe: Self excutable file Pin
pmarfleet1-Oct-07 2:09
pmarfleet1-Oct-07 2:09 
GeneralRe: Self excutable file Pin
zafax_1-Oct-07 2:15
zafax_1-Oct-07 2:15 

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.