ObjFW  Diff

Differences From Artifact [6c1eafc699]:

To Artifact [bf0c605954]:


87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
 *
 * \param buffer The buffer into which the data is read
 * \param length The length of the data that should be read at most.
 *		 The buffer <i>must</i> be at least this big!
 * \return The number of bytes read
 */
- (size_t)readIntoBuffer: (void*)buffer
		  length: (size_t)size;

/**
 * \brief Reads exactly the specified length bytes from the stream into a
 *	  buffer.
 *
 * Unlike readIntoBuffer:length:, this method does not return when less than the
 * specified length has been read - instead, it waits until it got exactly the







|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
 *
 * \param buffer The buffer into which the data is read
 * \param length The length of the data that should be read at most.
 *		 The buffer <i>must</i> be at least this big!
 * \return The number of bytes read
 */
- (size_t)readIntoBuffer: (void*)buffer
		  length: (size_t)length;

/**
 * \brief Reads exactly the specified length bytes from the stream into a
 *	  buffer.
 *
 * Unlike readIntoBuffer:length:, this method does not return when less than the
 * specified length has been read - instead, it waits until it got exactly the
278
279
280
281
282
283
284
285
286
287

288
289
290
291
292
293
294
295
296
297
298
299
300
301
302

303
304
305
306
307
308
309
310
311
312
313
314
315
316
317

318
319
320
321
322
323
324
325
326
327
328
329
330
331
332

333
334
335
336
337
338
339
340
341
342
343
344
345
346
347

348
349
350
351
352
353
354
355
356
357
358
/**
 * \brief Reads the specified number of uint16_ts from the stream which are
 *	  encoded in big endian.
 *
 * \warning Only call this when you know that enough data is available!
 *	    Otherwise you will get an exception!
 *
 * \param nInt16s The number of uint16_ts to read
 * \param buffer A buffer of sufficient size to store the specified number of
 *		 uint16_ts

 * \return The number of bytes read
 */
- (size_t)readBigEndianInt16sIntoBuffer: (uint16_t*)buffer
				  count: (size_t)nInt16s;

/**
 * \brief Reads the specified number of uint32_ts from the stream which are
 *	  encoded in big endian.
 *
 * \warning Only call this when you know that enough data is available!
 *	    Otherwise you will get an exception!
 *
 * \param nInt32s The number of uint32_ts to read
 * \param buffer A buffer of sufficient size to store the specified number of
 *		 uint32_ts

 * \return The number of bytes read
 */
- (size_t)readBigEndianInt32sIntoBuffer: (uint32_t*)buffer
				  count: (size_t)nInt32s;

/**
 * \brief Reads the specified number of uint64_ts from the stream which are
 *	  encoded in big endian.
 *
 * \warning Only call this when you know that enough data is available!
 *	    Otherwise you will get an exception!
 *
 * \param nInt64s The number of uint64_ts to read
 * \param buffer A buffer of sufficient size to store the specified number of
 *		 uint64_ts

 * \return The number of bytes read
 */
- (size_t)readBigEndianInt64sIntoBuffer: (uint64_t*)buffer
				  count: (size_t)nInt64s;

/**
 * \brief Reads the specified number of floats from the stream which are encoded
 *	  in big endian.
 *
 * \warning Only call this when you know that enough data is available!
 *	    Otherwise you will get an exception!
 *
 * \param nFloatss The number of floats to read
 * \param buffer A buffer of sufficient size to store the specified number of
 *		 floats

 * \return The number of bytes read
 */
- (size_t)readBigEndianFloatsIntoBuffer: (float*)buffer
				  count: (size_t)nFloats;

/**
 * \brief Reads the specified number of doubles from the stream which are
 *	  encoded in big endian.
 *
 * \warning Only call this when you know that enough data is available!
 *	    Otherwise you will get an exception!
 *
 * \param nDoubles The number of doubles to read
 * \param buffer A buffer of sufficient size to store the specified number of
 *		 doubles

 * \return The number of bytes read
 */
- (size_t)readBigEndianDoublesIntoBuffer: (double*)buffer
				   count: (size_t)nDoubles;

/**
 * \brief Reads a uint16_t from the stream which is encoded in little endian.
 *
 * \warning Only call this when you know that enough data is available!
 *	    Otherwise you will get an exception!
 *







<


>



|








<


>



|








<


>



|








<


>



|








<


>



|







278
279
280
281
282
283
284

285
286
287
288
289
290
291
292
293
294
295
296
297
298
299

300
301
302
303
304
305
306
307
308
309
310
311
312
313
314

315
316
317
318
319
320
321
322
323
324
325
326
327
328
329

330
331
332
333
334
335
336
337
338
339
340
341
342
343
344

345
346
347
348
349
350
351
352
353
354
355
356
357
358
/**
 * \brief Reads the specified number of uint16_ts from the stream which are
 *	  encoded in big endian.
 *
 * \warning Only call this when you know that enough data is available!
 *	    Otherwise you will get an exception!
 *

 * \param buffer A buffer of sufficient size to store the specified number of
 *		 uint16_ts
 * \param count The number of uint16_ts to read
 * \return The number of bytes read
 */
- (size_t)readBigEndianInt16sIntoBuffer: (uint16_t*)buffer
				  count: (size_t)count;

/**
 * \brief Reads the specified number of uint32_ts from the stream which are
 *	  encoded in big endian.
 *
 * \warning Only call this when you know that enough data is available!
 *	    Otherwise you will get an exception!
 *

 * \param buffer A buffer of sufficient size to store the specified number of
 *		 uint32_ts
 * \param count The number of uint32_ts to read
 * \return The number of bytes read
 */
- (size_t)readBigEndianInt32sIntoBuffer: (uint32_t*)buffer
				  count: (size_t)count;

/**
 * \brief Reads the specified number of uint64_ts from the stream which are
 *	  encoded in big endian.
 *
 * \warning Only call this when you know that enough data is available!
 *	    Otherwise you will get an exception!
 *

 * \param buffer A buffer of sufficient size to store the specified number of
 *		 uint64_ts
 * \param count The number of uint64_ts to read
 * \return The number of bytes read
 */
- (size_t)readBigEndianInt64sIntoBuffer: (uint64_t*)buffer
				  count: (size_t)count;

/**
 * \brief Reads the specified number of floats from the stream which are encoded
 *	  in big endian.
 *
 * \warning Only call this when you know that enough data is available!
 *	    Otherwise you will get an exception!
 *

 * \param buffer A buffer of sufficient size to store the specified number of
 *		 floats
 * \param count The number of floats to read
 * \return The number of bytes read
 */
- (size_t)readBigEndianFloatsIntoBuffer: (float*)buffer
				  count: (size_t)count;

/**
 * \brief Reads the specified number of doubles from the stream which are
 *	  encoded in big endian.
 *
 * \warning Only call this when you know that enough data is available!
 *	    Otherwise you will get an exception!
 *

 * \param buffer A buffer of sufficient size to store the specified number of
 *		 doubles
 * \param count The number of doubles to read
 * \return The number of bytes read
 */
- (size_t)readBigEndianDoublesIntoBuffer: (double*)buffer
				   count: (size_t)count;

/**
 * \brief Reads a uint16_t from the stream which is encoded in little endian.
 *
 * \warning Only call this when you know that enough data is available!
 *	    Otherwise you will get an exception!
 *
403
404
405
406
407
408
409
410
411
412

413
414
415
416
417
418
419
420
421
422
423
424
425
426
427

428
429
430
431
432
433
434
435
436
437
438
439
440
441
442

443
444
445
446
447
448
449
450
451
452
453
454
455
456
457

458
459
460
461
462
463
464
465
466
467
468
469
470
471
472

473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
/**
 * \brief Reads the specified number of uint16_ts from the stream which are
 *	  encoded in little endian.
 *
 * \warning Only call this when you know that enough data is available!
 *	    Otherwise you will get an exception!
 *
 * \param nInt16s The number of uint16_ts to read
 * \param buffer A buffer of sufficient size to store the specified number of
 *		 uint16_ts

 * \return The number of bytes read
 */
- (size_t)readLittleEndianInt16sIntoBuffer: (uint16_t*)buffer
				     count: (size_t)nInt16s;

/**
 * \brief Reads the specified number of uint32_ts from the stream which are
 *	  encoded in little endian.
 *
 * \warning Only call this when you know that enough data is available!
 *	    Otherwise you will get an exception!
 *
 * \param nInt32s The number of uint32_ts to read
 * \param buffer A buffer of sufficient size to store the specified number of
 *		 uint32_ts

 * \return The number of bytes read
 */
- (size_t)readLittleEndianInt32sIntoBuffer: (uint32_t*)buffer
				     count: (size_t)nInt32s;

/**
 * \brief Reads the specified number of uint64_ts from the stream which are
 *	  encoded in little endian.
 *
 * \warning Only call this when you know that enough data is available!
 *	    Otherwise you will get an exception!
 *
 * \param nInt64s The number of uint64_ts to read
 * \param buffer A buffer of sufficient size to store the specified number of
 *		 uint64_ts

 * \return The number of bytes read
 */
- (size_t)readLittleEndianInt64sIntoBuffer: (uint64_t*)buffer
				     count: (size_t)nInt64s;

/**
 * \brief Reads the specified number of floats from the stream which are
 *	  encoded in little endian.
 *
 * \warning Only call this when you know that enough data is available!
 *	    Otherwise you will get an exception!
 *
 * \param nFloats The number of floats to read
 * \param buffer A buffer of sufficient size to store the specified number of
 *		 floats

 * \return The number of bytes read
 */
- (size_t)readLittleEndianFloatsIntoBuffer: (float*)buffer
				     count: (size_t)nFloats;

/**
 * \brief Reads the specified number of doubles from the stream which are
 *	  encoded in little endian.
 *
 * \warning Only call this when you know that enough data is available!
 *	    Otherwise you will get an exception!
 *
 * \param nDoubles The number of doubles to read
 * \param buffer A buffer of sufficient size to store the specified number of
 *		 doubles

 * \return The number of bytes read
 */
- (size_t)readLittleEndianDoublesIntoBuffer: (double*)buffer
				      count: (size_t)nDoubles;

/**
 * \brief Reads the specified number of items with an item size of 1 from the
 *	  stream and returns them in an OFDataArray.
 *
 * \warning Only call this when you know that enough data is available!
 *	    Otherwise you will get an exception!
 *
 * \param nItems The number of items to read
 * \return An OFDataArray with at nItems items.
 */
- (OFDataArray*)readDataArrayWithSize: (size_t)size;

/**
 * \brief Reads the specified number of items with the specified item size from
 *	  the stream and returns them in an OFDataArray.
 *
 * \warning Only call this when you know that enough data is available!
 *	    Otherwise you will get an exception!
 *
 * \param itemSize The size of each item
 * \param nItems The number of items to read
 * \return An OFDataArray with at nItems items.
 */
- (OFDataArray*)readDataArrayWithItemSize: (size_t)itemSize
				    count: (size_t)nItems;

/**
 * \brief Returns an OFDataArray with all the remaining data of the stream.
 *
 * \return An OFDataArray with an item size of 1 with all the data of the
 *	   stream until the end of the stream is reached.
 */







<


>



|








<


>



|








<


>



|








<


>



|








<


>



|








|
|











|
|


|







403
404
405
406
407
408
409

410
411
412
413
414
415
416
417
418
419
420
421
422
423
424

425
426
427
428
429
430
431
432
433
434
435
436
437
438
439

440
441
442
443
444
445
446
447
448
449
450
451
452
453
454

455
456
457
458
459
460
461
462
463
464
465
466
467
468
469

470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
/**
 * \brief Reads the specified number of uint16_ts from the stream which are
 *	  encoded in little endian.
 *
 * \warning Only call this when you know that enough data is available!
 *	    Otherwise you will get an exception!
 *

 * \param buffer A buffer of sufficient size to store the specified number of
 *		 uint16_ts
 * \param count The number of uint16_ts to read
 * \return The number of bytes read
 */
- (size_t)readLittleEndianInt16sIntoBuffer: (uint16_t*)buffer
				     count: (size_t)count;

/**
 * \brief Reads the specified number of uint32_ts from the stream which are
 *	  encoded in little endian.
 *
 * \warning Only call this when you know that enough data is available!
 *	    Otherwise you will get an exception!
 *

 * \param buffer A buffer of sufficient size to store the specified number of
 *		 uint32_ts
 * \param count The number of uint32_ts to read
 * \return The number of bytes read
 */
- (size_t)readLittleEndianInt32sIntoBuffer: (uint32_t*)buffer
				     count: (size_t)count;

/**
 * \brief Reads the specified number of uint64_ts from the stream which are
 *	  encoded in little endian.
 *
 * \warning Only call this when you know that enough data is available!
 *	    Otherwise you will get an exception!
 *

 * \param buffer A buffer of sufficient size to store the specified number of
 *		 uint64_ts
 * \param count The number of uint64_ts to read
 * \return The number of bytes read
 */
- (size_t)readLittleEndianInt64sIntoBuffer: (uint64_t*)buffer
				     count: (size_t)count;

/**
 * \brief Reads the specified number of floats from the stream which are
 *	  encoded in little endian.
 *
 * \warning Only call this when you know that enough data is available!
 *	    Otherwise you will get an exception!
 *

 * \param buffer A buffer of sufficient size to store the specified number of
 *		 floats
 * \param count The number of floats to read
 * \return The number of bytes read
 */
- (size_t)readLittleEndianFloatsIntoBuffer: (float*)buffer
				     count: (size_t)count;

/**
 * \brief Reads the specified number of doubles from the stream which are
 *	  encoded in little endian.
 *
 * \warning Only call this when you know that enough data is available!
 *	    Otherwise you will get an exception!
 *

 * \param buffer A buffer of sufficient size to store the specified number of
 *		 doubles
 * \param count The number of doubles to read
 * \return The number of bytes read
 */
- (size_t)readLittleEndianDoublesIntoBuffer: (double*)buffer
				      count: (size_t)count;

/**
 * \brief Reads the specified number of items with an item size of 1 from the
 *	  stream and returns them in an OFDataArray.
 *
 * \warning Only call this when you know that enough data is available!
 *	    Otherwise you will get an exception!
 *
 * \param size The number of items to read
 * \return An OFDataArray with count items.
 */
- (OFDataArray*)readDataArrayWithSize: (size_t)size;

/**
 * \brief Reads the specified number of items with the specified item size from
 *	  the stream and returns them in an OFDataArray.
 *
 * \warning Only call this when you know that enough data is available!
 *	    Otherwise you will get an exception!
 *
 * \param itemSize The size of each item
 * \param count The number of items to read
 * \return An OFDataArray with count items.
 */
- (OFDataArray*)readDataArrayWithItemSize: (size_t)itemSize
				    count: (size_t)count;

/**
 * \brief Returns an OFDataArray with all the remaining data of the stream.
 *
 * \return An OFDataArray with an item size of 1 with all the data of the
 *	   stream until the end of the stream is reached.
 */
757
758
759
760
761
762
763
764
765
766

767
768
769
770
771
772
773
774
775
776
777
778

779
780
781
782
783
784
785
786
787
788
789
790

791
792
793
794
795
796
797
798
799
800
801
802

803
804
805
806
807
808
809
810
811
812
813
814

815
816
817
818
819
820
821
822
823
824
825
 */
- (void)writeBigEndianDouble: (double)double_;

/**
 * \brief Writes the specified number of uint16_ts into the stream, encoded in
 *	  big endian.
 *
 * \param nInt16 The number of uint16_ts to write
 * \param buffer The buffer from which the data is written to the stream after
 *		 it has been byte swapped if necessary

 * \return The number of bytes written to the stream
 */
- (size_t)writeBigEndianInt16s: (const uint16_t*)buffer
			 count: (size_t)nInt16s;

/**
 * \brief Writes the specified number of uint32_ts into the stream, encoded in
 *	  big endian.
 *
 * \param nInt32 The number of uint32_ts to write
 * \param buffer The buffer from which the data is written to the stream after
 *		 it has been byte swapped if necessary

 * \return The number of bytes written to the stream
 */
- (size_t)writeBigEndianInt32s: (const uint32_t*)buffer
			 count: (size_t)nInt32s;

/**
 * \brief Writes the specified number of uint64_ts into the stream, encoded in
 *	  big endian.
 *
 * \param nInt64 The number of uint64_ts to write
 * \param buffer The buffer from which the data is written to the stream after
 *		 it has been byte swapped if necessary

 * \return The number of bytes written to the stream
 */
- (size_t)writeBigEndianInt64s: (const uint64_t*)buffer
			 count: (size_t)nInt64s;

/**
 * \brief Writes the specified number of floats into the stream, encoded in big
 *	  endian.
 *
 * \param nFloats The number of floats to write
 * \param buffer The buffer from which the data is written to the stream after
 *		 it has been byte swapped if necessary

 * \return The number of bytes written to the stream
 */
- (size_t)writeBigEndianFloats: (const float*)buffer
			 count: (size_t)nFloats;

/**
 * \brief Writes the specified number of doubles into the stream, encoded in
 *	  big endian.
 *
 * \param nDoubles The number of doubles to write
 * \param buffer The buffer from which the data is written to the stream after
 *		 it has been byte swapped if necessary

 * \return The number of bytes written to the stream
 */
- (size_t)writeBigEndianDoubles: (const double*)buffer
			  count: (size_t)nDoubles;

/**
 * \brief Writes a uint16_t into the stream, encoded in little endian.
 *
 * \param int16 A uint16_t
 */
- (void)writeLittleEndianInt16: (uint16_t)int16;







<


>



|





<


>



|





<


>



|





<


>



|





<


>



|







757
758
759
760
761
762
763

764
765
766
767
768
769
770
771
772
773
774
775

776
777
778
779
780
781
782
783
784
785
786
787

788
789
790
791
792
793
794
795
796
797
798
799

800
801
802
803
804
805
806
807
808
809
810
811

812
813
814
815
816
817
818
819
820
821
822
823
824
825
 */
- (void)writeBigEndianDouble: (double)double_;

/**
 * \brief Writes the specified number of uint16_ts into the stream, encoded in
 *	  big endian.
 *

 * \param buffer The buffer from which the data is written to the stream after
 *		 it has been byte swapped if necessary
 * \param count The number of uint16_ts to write
 * \return The number of bytes written to the stream
 */
- (size_t)writeBigEndianInt16s: (const uint16_t*)buffer
			 count: (size_t)count;

/**
 * \brief Writes the specified number of uint32_ts into the stream, encoded in
 *	  big endian.
 *

 * \param buffer The buffer from which the data is written to the stream after
 *		 it has been byte swapped if necessary
 * \param count The number of uint32_ts to write
 * \return The number of bytes written to the stream
 */
- (size_t)writeBigEndianInt32s: (const uint32_t*)buffer
			 count: (size_t)count;

/**
 * \brief Writes the specified number of uint64_ts into the stream, encoded in
 *	  big endian.
 *

 * \param buffer The buffer from which the data is written to the stream after
 *		 it has been byte swapped if necessary
 * \param count The number of uint64_ts to write
 * \return The number of bytes written to the stream
 */
- (size_t)writeBigEndianInt64s: (const uint64_t*)buffer
			 count: (size_t)count;

/**
 * \brief Writes the specified number of floats into the stream, encoded in big
 *	  endian.
 *

 * \param buffer The buffer from which the data is written to the stream after
 *		 it has been byte swapped if necessary
 * \param count The number of floats to write
 * \return The number of bytes written to the stream
 */
- (size_t)writeBigEndianFloats: (const float*)buffer
			 count: (size_t)count;

/**
 * \brief Writes the specified number of doubles into the stream, encoded in
 *	  big endian.
 *

 * \param buffer The buffer from which the data is written to the stream after
 *		 it has been byte swapped if necessary
 * \param count The number of doubles to write
 * \return The number of bytes written to the stream
 */
- (size_t)writeBigEndianDoubles: (const double*)buffer
			  count: (size_t)count;

/**
 * \brief Writes a uint16_t into the stream, encoded in little endian.
 *
 * \param int16 A uint16_t
 */
- (void)writeLittleEndianInt16: (uint16_t)int16;
852
853
854
855
856
857
858
859
860
861

862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885

886
887
888
889
890
891
892
893
894
895
896
897

898
899
900
901
902
903
904
905
906
907
908
909

910
911
912
913
914
915
916
917
918
919
920
 */
- (void)writeLittleEndianDouble: (double)double_;

/**
 * \brief Writes the specified number of uint16_ts into the stream, encoded in
 *	  little endian.
 *
 * \param nInt16 The number of uint16_ts to write
 * \param buffer The buffer from which the data is written to the stream after
 *		 it has been byte swapped if necessary

 * \return The number of bytes written to the stream
 */
- (size_t)writeLittleEndianInt16s: (const uint16_t*)buffer
			    count: (size_t)nInt16s;

/**
 * \brief Writes the specified number of uint32_ts into the stream, encoded in
 *	  little endian.
 *
 * \param nInt32 The number of uint32_ts to write
 * \param buffer The buffer from which the data is written to the stream after
 *		 it has been byte swapped if necessary
 * \return The number of bytes written to the stream
 */
- (size_t)writeLittleEndianInt32s: (const uint32_t*)buffer
			    count: (size_t)nInt32s;

/**
 * \brief Writes the specified number of uint64_ts into the stream, encoded in
 *	  little endian.
 *
 * \param nInt64 The number of uint64_ts to write
 * \param buffer The buffer from which the data is written to the stream after
 *		 it has been byte swapped if necessary

 * \return The number of bytes written to the stream
 */
- (size_t)writeLittleEndianInt64s: (const uint64_t*)buffer
			    count: (size_t)nInt64s;

/**
 * \brief Writes the specified number of floats into the stream, encoded in
 *	  little endian.
 *
 * \param nFloats The number of floats to write
 * \param buffer The buffer from which the data is written to the stream after
 *		 it has been byte swapped if necessary

 * \return The number of bytes written to the stream
 */
- (size_t)writeLittleEndianFloats: (const float*)buffer
			    count: (size_t)nFloats;

/**
 * \brief Writes the specified number of doubles into the stream, encoded in
 *	  little endian.
 *
 * \param nDoubles The number of doubles to write
 * \param buffer The buffer from which the data is written to the stream after
 *		 it has been byte swapped if necessary

 * \return The number of bytes written to the stream
 */
- (size_t)writeLittleEndianDoubles: (const double*)buffer
			     count: (size_t)nDoubles;

/**
 * \brief Writes from an OFDataArray into the stream.
 *
 * \param dataArray The OFDataArray to write into the stream
 * \return The number of bytes written
 */







<


>



|





|





|





<


>



|





<


>



|





<


>



|







852
853
854
855
856
857
858

859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882

883
884
885
886
887
888
889
890
891
892
893
894

895
896
897
898
899
900
901
902
903
904
905
906

907
908
909
910
911
912
913
914
915
916
917
918
919
920
 */
- (void)writeLittleEndianDouble: (double)double_;

/**
 * \brief Writes the specified number of uint16_ts into the stream, encoded in
 *	  little endian.
 *

 * \param buffer The buffer from which the data is written to the stream after
 *		 it has been byte swapped if necessary
 * \param count The number of uint16_ts to write
 * \return The number of bytes written to the stream
 */
- (size_t)writeLittleEndianInt16s: (const uint16_t*)buffer
			    count: (size_t)count;

/**
 * \brief Writes the specified number of uint32_ts into the stream, encoded in
 *	  little endian.
 *
 * \param count The number of uint32_ts to write
 * \param buffer The buffer from which the data is written to the stream after
 *		 it has been byte swapped if necessary
 * \return The number of bytes written to the stream
 */
- (size_t)writeLittleEndianInt32s: (const uint32_t*)buffer
			    count: (size_t)count;

/**
 * \brief Writes the specified number of uint64_ts into the stream, encoded in
 *	  little endian.
 *

 * \param buffer The buffer from which the data is written to the stream after
 *		 it has been byte swapped if necessary
 * \param count The number of uint64_ts to write
 * \return The number of bytes written to the stream
 */
- (size_t)writeLittleEndianInt64s: (const uint64_t*)buffer
			    count: (size_t)count;

/**
 * \brief Writes the specified number of floats into the stream, encoded in
 *	  little endian.
 *

 * \param buffer The buffer from which the data is written to the stream after
 *		 it has been byte swapped if necessary
 * \param count The number of floats to write
 * \return The number of bytes written to the stream
 */
- (size_t)writeLittleEndianFloats: (const float*)buffer
			    count: (size_t)count;

/**
 * \brief Writes the specified number of doubles into the stream, encoded in
 *	  little endian.
 *

 * \param buffer The buffer from which the data is written to the stream after
 *		 it has been byte swapped if necessary
 * \param count The number of doubles to write
 * \return The number of bytes written to the stream
 */
- (size_t)writeLittleEndianDoubles: (const double*)buffer
			     count: (size_t)count;

/**
 * \brief Writes from an OFDataArray into the stream.
 *
 * \param dataArray The OFDataArray to write into the stream
 * \return The number of bytes written
 */