Joedb 10.4.3
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
Readonly_Encoded_File.h
Go to the documentation of this file.
1#ifndef joedb_Readonly_Encoded_File_declared
2#define joedb_Readonly_Encoded_File_declared
3
7
8namespace joedb
9{
10 /// @ingroup journal
12 {
13 private:
15 const Abstract_File &blob_reader;
16
17 mutable std::vector<char> read_buffer;
18 mutable db::encoded_file::id_of_buffer decoded_buffer;
19
20 protected:
21 static constexpr size_t max_buffer_size = 1 << 24;
22
24
25 size_t pread(char * buffer, size_t size, int64_t offset) const override;
26
28 (
31 const Abstract_File &blob_reader,
32 Open_Mode mode
33 );
34
35 public:
37 (
40 const Abstract_File &blob_reader
41 );
42
43 int64_t get_size() const override;
44 };
45}
46
47#endif
static constexpr size_t max_buffer_size
size_t pread(char *buffer, size_t size, int64_t offset) const override
Read a range of bytes.
int64_t get_size() const override
Get the size of the file, or -1 if it is unknown.
Store all the tables of the database.
Definition Database.h:70
Strongly-typed wrapper around an integer representing a row of the buffer table.
Definition ids.h:25
Open_Mode
Definition Open_Mode.h:8