|
ZXC 0.15.0
High-performance asymmetric lossless compression library
|
Storage-agnostic reader interface for seekable archives. More...
#include <zxc_seekable.h>
Data Fields | |
| int64_t(* | read_at )(void *ctx, void *dst, size_t len, uint64_t offset) |
Reads exactly len bytes at offset into dst. | |
| void * | ctx |
Opaque user context passed unchanged to read_at. | |
| uint64_t | size |
| Total size of the compressed archive in bytes. | |
Storage-agnostic reader interface for seekable archives.
Plugs any backend behind the seekable reader: mmap, HTTP range requests, S3, a custom VFS, kernel vfs_read. Positional reads only, no seeking state.
read_at MUST be safe to call concurrently under zxc_seekable_decompress_range_mt(), or when calls on one handle overlap: all of them read through it, zxc_seekable_get_block_comp_size() included.ctx and the backing storage must both outlive the zxc_seekable handle (until zxc_seekable_free()). Definition at line 120 of file zxc_seekable.h.
| void* zxc_reader_t::ctx |
Opaque user context passed unchanged to read_at.
Definition at line 135 of file zxc_seekable.h.
| int64_t(* zxc_reader_t::read_at) (void *ctx, void *dst, size_t len, uint64_t offset) |
Reads exactly len bytes at offset into dst.
| [in,out] | ctx | Opaque user context (forwarded from zxc_reader_t::ctx). |
| [out] | dst | Destination buffer. |
| [in] | len | Number of bytes to read. |
| [in] | offset | Byte offset from the start of the archive. |
== len on success), or a negative zxc_error_t. The seekable reader treats a short read as an error. Definition at line 132 of file zxc_seekable.h.
Referenced by zxc_seekable_open_file(), and zxc_seekable_open_reader().
| uint64_t zxc_reader_t::size |
Total size of the compressed archive in bytes.
Definition at line 138 of file zxc_seekable.h.
Referenced by zxc_seekable_open_reader().