132 int64_t (*read_at)(
void* ctx,
void* dst,
size_t len, uint64_t offset);
186 const uint64_t block_idx);
196 const uint64_t block_idx);
219 const size_t dst_capacity,
const uint64_t offset,
243 const size_t dst_capacity,
244 const uint64_t offset,
const size_t len,
289 const void* dict_huf);
310 const uint32_t* comp_sizes,
const uint64_t num_blocks);
int64_t zxc_seekable_decompress_range_mt(zxc_seekable *s, void *dst, const size_t dst_capacity, const uint64_t offset, const size_t len, int n_threads)
Multi-threaded variant of zxc_seekable_decompress_range().
void zxc_seekable_free(zxc_seekable *s)
Frees a seekable handle and all associated resources.
int64_t zxc_seekable_decompress_range(zxc_seekable *s, void *dst, const size_t dst_capacity, const uint64_t offset, const size_t len)
Decompresses an arbitrary byte range of the original data.
uint64_t zxc_seekable_get_num_blocks(const zxc_seekable *s)
Returns the total number of blocks in the seekable archive.
uint32_t zxc_seekable_get_block_decomp_size(const zxc_seekable *s, const uint64_t block_idx)
Returns the decompressed size of a specific block.
int64_t zxc_write_seek_table(uint8_t *dst, const size_t dst_capacity, const uint32_t *comp_sizes, const uint64_t num_blocks)
Writes a seek table to the destination buffer.
size_t zxc_seek_table_size(const uint64_t num_blocks)
Returns the encoded size of a seek table for the given block count.
uint64_t zxc_seekable_get_decompressed_size(const zxc_seekable *s)
Returns the total decompressed size of the seekable archive.
int zxc_seekable_set_dict(zxc_seekable *s, const void *dict, size_t dict_size, const void *dict_huf)
Attaches a pre-trained dictionary to a seekable handle.
uint32_t zxc_seekable_get_block_comp_size(const zxc_seekable *s, const uint64_t block_idx)
Returns the compressed size of a specific block.
int zxc_seekable_set_checksum(zxc_seekable *s, int enabled)
Turns per-block checksum verification on or off.
zxc_seekable * zxc_seekable_open(const void *src, const size_t src_size)
Opens a seekable archive from a memory buffer.
zxc_seekable * zxc_seekable_open_reader(const zxc_reader_t *r)
Opens a seekable archive through a user-supplied reader.
struct zxc_seekable_s zxc_seekable
Opaque handle for a seekable ZXC archive.
Storage-agnostic reader interface for seekable archives.
uint64_t size
Total size of the compressed archive in bytes.
void * ctx
Opaque user context passed unchanged to read_at.
Platform-specific symbol visibility macros.