Home » U++ Library support » U++ Core » streaming [FEATURE REQUEST]
Re: streaming [FEATURE REQUEST] [message #19363 is a reply to message #19361] |
Fri, 28 November 2008 21:11 |
|
mirek
Messages: 13980 Registered: November 2005
|
Ultimate Member |
|
|
Quote: |
Would save it as binary file or as text file ("wt" or "wb" with FILE pointer), no matter which operator was used for filling. At Windows there are both possible (unlike Linux I've heard).
|
Yeah, but what is the difference?
There is no "wt" or "wb" in Linux, because in Linux there is no difference at all. In Windows, the difference is only in resolving that stupid '\r' issue. In U++, that is succesfully hidden by GetLine usually.
Quote: |
Do not know what you mean with Putn[le|be].
|
Put32le, Get32be etc...
[quote]
Quote: | LE/BE is usually not a variable for given file format.
|
Hmmm, I am pretty sure it is. For a *.wav (LE) I need to write/read the low byte first, for a *.mid (BE) at last.
[/quoute]
Variable = can be different for one format. It is either one or another (usually based on what system the format has emerged. Amiga / Mac orginated formats tend to be BE, PC formats LE).
There are of course exception to this rule, some formats can e.g. have flags that resolves this.
Quote: |
StringStream binData(LE).
dword d = 0xAA2244FF;
binData % d;
But its your business of course how you make it ultimatly.
|
You should never read 'public' file formats using serialization, the way how things are serialized is "implementation detail".
Use those Getn[le|be] instead.
Mirek
|
|
|
Goto Forum:
Current Time: Tue May 21 11:54:16 CEST 2024
Total time taken to generate the page: 0.01981 seconds
|