Displaying 2 results from an estimated 2 matches for "thinstream".
2017 Feb 19
5
RFC: Adding llvm::ThinStream
...nterface. Also, I
needed the ability to read and write using a single interface without
worrying about the details of the block structure. None of LLVM's existing
abstractions provided convenient mechanisms for writing this kind of data.
So I came up with the following set of abstractions:
*ThinStream* - An abstract base class that provides read-only access to
data. The interface is:
virtual Error readBytes(uint32_t Offset, uint32_t Size, ArrayRef<uint8_t>
&Buffer) const = 0;
virtual Error readLongestContiguousChunk(uint32_t Offset,
ArrayRef<uint8_t> &Buffer) const = 0;...
2017 Feb 22
2
RFC: Adding llvm::ThinStream
...(I 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 con...