48 file((uint8_t *)memory),
virtual void read(document &buffer)
Read buffer.size() bytes of data into buffer.contents, resizing on eof.
Definition: instream_memory.cpp:19
Read data from an input stream.
Definition: instream.h:45
Container class representing a document through the indexing pipeline.
Definition: document.h:31
std::shared_ptr< allocator > memory
Any and all memory allocation must happen using this object.
Definition: instream.h:49
instream_memory(const void *memory, size_t length)
Constructor.
Definition: instream_memory.h:45
Base class for reading data from some input source.
Subclass of instream for reading data from a memory buffer.
Definition: instream_memory.h:28
size_t bytes_read
The number of bytes this object has read for the buffer.
Definition: instream_memory.h:31
static void unittest(void)
Unit test this class.
Definition: instream_memory.cpp:52
size_t file_length
The length of the in-memory buffer.
Definition: instream_memory.h:33
Definition: compress_integer_elias_delta_simd.c:23
const uint8_t * file
A pointer to the in-memory buffer (thought of as an in-place file)
Definition: instream_memory.h:32