Major changes to api and structure.
- Remove newline caching - limit petal sizes - make public facing api use points only - fix iterators (chunk & line)
This commit is contained in:
@@ -5,16 +5,13 @@
|
||||
|
||||
struct OriginalBuffer : Buffer {
|
||||
char *buf;
|
||||
uint32_t length;
|
||||
std::vector<uint32_t> newlines;
|
||||
uint32_t len;
|
||||
|
||||
// TODO: replace with file io or even lazy loaded file io for large files/logs etc. later.
|
||||
OriginalBuffer(char *buf, uint32_t length);
|
||||
OriginalBuffer(char *buf, uint32_t len);
|
||||
|
||||
~OriginalBuffer();
|
||||
|
||||
const char *read(uint32_t pos, uint32_t *out_len);
|
||||
uint32_t count_lines(uint32_t pos, uint32_t length);
|
||||
uint32_t next_newline(uint32_t pos);
|
||||
uint32_t nth_newline(uint32_t pos, uint32_t n);
|
||||
uint32_t length();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user