Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous messageGo to previous message
mirek is currently offline  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
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [Solved] Any::dtor fails after it is picked
Next Topic: [BUG] resolving program's file name for debug output
Goto Forum:
  


Current Time: Tue May 21 11:54:16 CEST 2024

Total time taken to generate the page: 0.01981 seconds