19#ifndef LIBAARUFORMAT_ERASURE_INTERNAL_H
20#define LIBAARUFORMAT_ERASURE_INTERNAL_H
28 const uint8_t *payload, uint32_t payload_size, uint64_t file_offset);
60 uint8_t *data, uint32_t *length, uint8_t sector_status);
81 uint8_t **recovered_data, uint32_t *recovered_size,
82 void *stripes, uint32_t stripe_count,
void *lookup,
83 uint16_t group_K, uint16_t group_M, uint32_t group_shard_size);
91 uint8_t **recovered_data, uint32_t *recovered_size);
97 uint8_t **recovered_data, uint32_t *recovered_size);
Central runtime context structures for libaaruformat (image state, caches, checksum buffers).
On-disk layout structures for data-bearing and geometry blocks.
void ec_load_ecmb(aaruformat_context *ctx)
Try to load the ECMB from the recovery footer at EOF.
void ec_finalize(aaruformat_context *ctx)
Flush all partial data stripes and write parity for all groups + ECMB + recovery footer.
int32_t ec_recover_ddt_block(aaruformat_context *ctx, uint64_t block_offset, uint8_t **recovered_data, uint32_t *recovered_size)
Attempt to recover a DDT secondary block at a given file offset.
void ec_accumulate_data_block(aaruformat_context *ctx, const BlockHeader *block_header, const uint8_t *lzma_props, const uint8_t *payload, uint32_t payload_size, uint64_t file_offset)
Accumulate parity for a data block that was just written to disk.
int32_t ec_recover_data_block(aaruformat_context *ctx, uint64_t block_offset, uint64_t offset, uint8_t *data, uint32_t *length, uint8_t sector_status)
Attempt to recover a data block that failed decompression or CRC verification.
int32_t ec_recover_meta_block(aaruformat_context *ctx, uint64_t block_offset, uint8_t **recovered_data, uint32_t *recovered_size)
Attempt to recover a metadata/media-tag block at a given file offset.
void ec_flush_data_stripe(aaruformat_context *ctx, uint32_t slot)
Write M parity blocks for a completed data stripe slot and record the stripe descriptor.
void ec_free(aaruformat_context *ctx)
Free all erasure coding state from the context.
int32_t ec_recover_raw_block(aaruformat_context *ctx, uint64_t block_offset, uint8_t **recovered_data, uint32_t *recovered_size, void *stripes, uint32_t stripe_count, void *lookup, uint16_t group_K, uint16_t group_M, uint32_t group_shard_size)
Attempt to recover a raw block at a given file offset using a specified stripe group.
Master context representing an open or in‑creation Aaru image.