You could also use streams instead of BlockRead/BlockWrite as they are abstract, compatible with all stream types (file, memory, resource ...), they are also CrossPlatform and supported by FPC.
You can also subclass them and make custom streams for various data.