#ifndef MMAP_FILE_H_ #define MMAP_FILE_H_ #include #include "capnp/message.h" #include "kj/array.h" // Platform independent mmap, useful for reading large capnp's. class MmapFile { public: explicit MmapFile(const std::string& file); const kj::ArrayPtr getData() const; private: size_t size_; kj::Array data_; }; #endif /* MMAP_FILE_H_ */