search for: streamread

Displaying 2 results from an estimated 2 matches for "streamread".

Did you mean: streamhead
2017 Feb 19
5
RFC: Adding llvm::ThinStream
...file system object. One could easily imagine an implementation that adapts `llvm::MemoryBuffer` so that you could read and write from mmap'ed files. But all of these just allow reading and writing raw bytes. To handle reading and writing semantic data, there are two additional classes. *ThinStreamReader* and *ThinStreamWriter.* These accept any subclass of `ThinStream` and maintain an offset and allow you to read integers in any endianness, strings, objects, arrays of objects (both fixed length records and variable length records), and various other things. Finally, there are *ThinStreamRef* a...
2017 Feb 22
2
RFC: Adding llvm::ThinStream
...think) remains valid for the life of the stream? (this also makes me wonder a bit about memory usage if the cross-block operation is used a lot (causing allocations) but the values are then discarded by the user - the memory can't be reused, it's effectively leaked) Also - the wrappers ThinStreamReader/Writer - do they benefit substantially from being thin-stream aware, rather than abstractions around any stream of bytes? (since they transform the data anyway) Oh, reinterpret casting... hrm. That kind of file reading/writing scheme usually makes me a bit uncomfortable due to portability concern...