1 #ifndef MSP_DATAFILE_RAWDATA_H_
2 #define MSP_DATAFILE_RAWDATA_H_
5 #include <msp/core/noncopyable.h>
6 #include <msp/io/base.h>
7 #include "mspdatafile_api.h"
14 class MSPDATAFILE_API RawData: public NonCopyable
23 IO::Base *in = nullptr;
24 bool in_owned = false;
25 IO::Base *compressed = nullptr;
28 char *owned_data = nullptr;
30 static const char signature[4];
35 static bool detect_signature(const std::string &);
37 void open_file(Collection &, const std::string &);
38 void open_io(IO::Base &, const std::string &);
40 void load_into(void *);
42 void write_io(IO::Base &, bool = false);
44 std::size_t get_size() const { return size; }
45 const void *get_data() const { return data; }
48 } // namespace DataFile