Buffered TStreams

BlitzMax Forums/BlitzMax Programming/Buffered TStreams

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

How about instead of some buffering you supply methods for reading large numbers of non-byte values in the endian stream types. Make sure to read them into a buffer first and then reorder the bytes for the platform. Faster than converting them one at a time.

Read( buf:Byte Ptr,count ) <-- this is already there
TStream.readShorts(buf:Short Ptr, count)
TStream.readInts(buf:Int Ptr, count)
TStream.readFloats(buf:Float Ptr, count)
TStream.readDoubles(buf:Double Ptr, count)