Add random read/write access for streams
Structured Storage .net component - pure C#
Brought to you by:
ironfede
Add random read/write access for streams.
Preferably by implementing the Stream interface, or at the least something like:
int Read(long streamPosition, byte[] buffer, int offset, int len)
void Write(long streamPosition, byte[] buffer, int offset, int len)
Thank you for your advices JArred
Random access feature for reading is already present with the CFStream overloaded method
public Byte[] GetData(long offset, ref int count){...}
while the write part could be a nice thing to add to OpenMcdf.
Best Regards,
Federico
It is faster and more compatible with other apis to be able to read into an existing buffer rather than return a new byte array each time.
Those 2 methods would be enough to make a Stream wrapper for it without too much overhead.