I have to rewrite Delphi code which parses and creates certain file formats (all single byte based) and do not find a multi-platform way to do it. (The code should work on Island, OSX, .NET and Java.)
When I was writing files before I also wrote to the characters of an AnsiString which works very fast with Delphi. The RTL AnsiString class allows writing, but is this effective?
When reading files I was using a memory stream and a pointer into the memory. That obviously does not work anymore.
When I create an array of bytes do I get a buffer with bytes or do I get an array of objects pointing to Byte objects?
Does anybody have a hint to the ideal approach to solve this problem?