Click here to Skip to main content
15,890,717 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow can set some minimum size of SDI application? Pin
Le@rner21-Oct-10 21:16
Le@rner21-Oct-10 21:16 
AnswerRe: How can set some minimum size of SDI application? Pin
Hans Dietrich21-Oct-10 21:59
mentorHans Dietrich21-Oct-10 21:59 
GeneralRe: How can set some minimum size of SDI application? Pin
Le@rner21-Oct-10 22:34
Le@rner21-Oct-10 22:34 
AnswerRe: How can set some minimum size of SDI application? Pin
GAJERA21-Oct-10 22:11
GAJERA21-Oct-10 22:11 
QuestionHow can calculate time taken by any function? Pin
Le@rner21-Oct-10 19:56
Le@rner21-Oct-10 19:56 
AnswerRe: How can calculate time taken by any function? Pin
Peter_in_278021-Oct-10 20:21
professionalPeter_in_278021-Oct-10 20:21 
QuestionHow to write a existing bigger binary file into small/compact binary file in C. Pin
cancerion21-Oct-10 19:42
cancerion21-Oct-10 19:42 
AnswerRe: How to write a existing bigger binary file into small/compact binary file in C. Pin
ghle21-Oct-10 20:04
ghle21-Oct-10 20:04 
WinZip(3GB_Filename, 2GB_Filename);
?
Smile | :)


Seriously, it depends on what is contained in the 3GB binary file. Is it even compressible?

If it contains lots of NULLS, for example, change the NULL bytes to a single NULL followed by a count of how many there are. A string of 10 NULLS would turn into a single NULL and a byte with the number 10 in it, saving 8 bytes.

Reading the file in, you would simply reverse the process.

1,2,3,4,5,0,0,0,0,0,0,0,0,0,0,1,2,3,a,b,c,0,0,0,0,d,e,0,f,ff
(30 bytes)

Becomes
1,2,3,4,5,0,a,1,2,3,a,b,c,0,4,d,e,0,1,f,ff
(21 bytes)

Alternatively, implement one of the Open Source Zip and Unzip routines in your C and C# code, as appropriate.
Gary

AnswerRe: How to write a existing bigger binary file into small/compact binary file in C. Pin
GAJERA21-Oct-10 21:03
GAJERA21-Oct-10 21:03 
AnswerRe: How to write a existing bigger binary file into small/compact binary file in C. Pin
Aescleal21-Oct-10 21:39
Aescleal21-Oct-10 21:39 
AnswerRe: How to write a existing bigger binary file into small/compact binary file in C. Pin
rp_suman22-Oct-10 1:04
rp_suman22-Oct-10 1:04 
QuestionError : can not open file "hid.lib" Pin
Ruchira Patel21-Oct-10 18:56
Ruchira Patel21-Oct-10 18:56 
AnswerRe: Error : can not open file "hid.lib" Pin
rp_suman21-Oct-10 19:44
rp_suman21-Oct-10 19:44 
GeneralRe: Error : can not open file "hid.lib" Pin
Cedric Moonen21-Oct-10 20:27
Cedric Moonen21-Oct-10 20:27 
GeneralRe: Error : can not open file "hid.lib" Pin
rp_suman22-Oct-10 0:46
rp_suman22-Oct-10 0:46 
AnswerRe: Error : can not open file "hid.lib" Pin
Cedric Moonen21-Oct-10 20:25
Cedric Moonen21-Oct-10 20:25 
AnswerRe: Error : can not open file "hid.lib" Pin
David Crow22-Oct-10 3:01
David Crow22-Oct-10 3:01 
QuestionAuto Update My Application... Pin
loid grey manuel21-Oct-10 17:35
loid grey manuel21-Oct-10 17:35 
AnswerRe: Auto Update My Application... Pin
Moak22-Oct-10 0:07
Moak22-Oct-10 0:07 
GeneralRe: Auto Update My Application... Pin
loid grey manuel25-Oct-10 14:41
loid grey manuel25-Oct-10 14:41 
QuestionLoading a Registry Hive with RegLoadKey() Pin
Richard Andrew x6421-Oct-10 14:41
professionalRichard Andrew x6421-Oct-10 14:41 
AnswerRe: Loading a Registry Hive with RegLoadKey() Pin
David Crow21-Oct-10 14:54
David Crow21-Oct-10 14:54 
GeneralRe: Loading a Registry Hive with RegLoadKey() Pin
Richard Andrew x6421-Oct-10 14:58
professionalRichard Andrew x6421-Oct-10 14:58 
QuestionMinGW dependancies Pin
James_72221-Oct-10 10:41
James_72221-Oct-10 10:41 
AnswerRe: MinGW dependancies Pin
Aescleal21-Oct-10 21:36
Aescleal21-Oct-10 21:36 

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.