0bfa9300db
- Make original buffer use a disk backed mapping to save memory. - rearrange api function headers for search etc. - fix bugs with iterators. - support uint64_t for all byte and line offsets to allow for much larger files to be opened. - and more minor bug fixes.
18 lines
276 B
C
18 lines
276 B
C
#pragma once
|
|
|
|
#include "buffer.h"
|
|
#include "pch.h"
|
|
|
|
struct OriginalBuffer : Buffer {
|
|
const char *buf;
|
|
uint64_t len;
|
|
int fd = -1;
|
|
|
|
OriginalBuffer();
|
|
~OriginalBuffer();
|
|
|
|
void initialize();
|
|
const char *read(uint64_t pos, uint64_t *out_len);
|
|
uint64_t length();
|
|
};
|