/build/sourc...xor_hd_code.c(3)
π NAME π
Ok bestie, welcome to the liberasurecode manual page for /build/sourc...xor_hd_code.c(3) β the actual file under the microscope is /build/source/src/builtin/xor_codes/xor_hd_code.c. π
β¨
πΈ SYNOPSIS πΈ
You gotta pull in these headers first, no cap:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include 'xor_code.h'
#include 'xor_hd_code_defs.h'
β¨ Functions β¨
Here's the whole cast, signatures exactly as they appear β line breaks and all, bestie:
static int fragments_needed_one_data (xor_code_t *code_desc, int
*missing_data, int *missing_parity, unsigned int *data_bm, unsigned
int *parity_bm)
static int fragments_needed_two_data (xor_code_t *code_desc, int
*missing_data, int *missing_parity, unsigned int *data_bm, unsigned
int *parity_bm)
static int fragments_needed_three_data (xor_code_t *code_desc, int
*missing_data, int *missing_parity, unsigned int *data_bm, unsigned
int *parity_bm)
static int fragments_needed_one_data_local (xor_code_t *code_desc, int
fragment_to_reconstruct, int *fragments_to_exclude, unsigned int
*data_bm, unsigned int *parity_bm)
int xor_hd_fragments_needed (xor_code_t *code_desc, int
*fragments_to_reconstruct, int *fragments_to_exclude, int
*fragments_needed)
static void decode_one_data (xor_code_t *code_desc, char **data, char
**parity, int *missing_data, int *missing_parity, int blocksize)
static int decode_two_data (xor_code_t *code_desc, char **data, char
**parity, int *missing_data, int *missing_parity, int blocksize)
static int decode_three_data (xor_code_t *code_desc, char **data, char
**parity, int *missing_data, int *missing_parity, int blocksize)
int xor_hd_decode (xor_code_t *code_desc, char **data, char **parity,
int *missing_idxs, int blocksize, int decode_parity)
xor_code_t * init_xor_hd_code (int k, int m, int hd)
π Function Documentation π
π
decode_one_data π
void decode_one_data (xor_code_t * code_desc, char ** data, char ** parity,
int * missing_data, int * missing_parity, int blocksize) [static]
Definition? Line 415 of xor_hd_code.c. Periodt. π«Ά
Referenced by decode_two_data(), and xor_hd_decode().
π
decode_three_data π
int decode_three_data (xor_code_t * code_desc, char ** data, char ** parity,
int * missing_data, int * missing_parity, int blocksize) [static]
Definition lives at line 465 of xor_hd_code.c. β¨
References decode_two_data().
Referenced by xor_hd_decode().
π
decode_two_data π
int decode_two_data (xor_code_t * code_desc, char ** data, char ** parity,
int * missing_data, int * missing_parity, int blocksize) [static]
Definition check: line 432 of xor_hd_code.c. π
References decode_one_data().
Referenced by decode_three_data(), and xor_hd_decode().
π
fragments_needed_one_data π
int fragments_needed_one_data (xor_code_t * code_desc, int * missing_data,
int * missing_parity, unsigned int * data_bm, unsigned int * parity_bm)
[static]
Definition is at line 34 of xor_hd_code.c. π¦
Referenced by fragments_needed_two_data(), and xor_hd_fragments_needed().
π
fragments_needed_one_data_local π
int fragments_needed_one_data_local (xor_code_t * code_desc, int
fragment_to_reconstruct, int * fragments_to_exclude, unsigned int *
data_bm, unsigned int * parity_bm) [static]
Definition is at line 178 of xor_hd_code.c. πΈ
Referenced by xor_hd_fragments_needed().
π
fragments_needed_three_data π
int fragments_needed_three_data (xor_code_t * code_desc, int * missing_data,
int * missing_parity, unsigned int * data_bm, unsigned int * parity_bm)
[static]
Definition is at line 91 of xor_hd_code.c. π
References fragments_needed_two_data().
Referenced by xor_hd_fragments_needed().
π
fragments_needed_two_data π
int fragments_needed_two_data (xor_code_t * code_desc, int * missing_data,
int * missing_parity, unsigned int * data_bm, unsigned int * parity_bm)
[static]
Definition is at line 56 of xor_hd_code.c. β
References fragments_needed_one_data().
Referenced by fragments_needed_three_data(), and xor_hd_fragments_needed().
π init_xor_hd_code π
xor_code_t * init_xor_hd_code (int k, int m, int hd)
Definition is at line 657 of xor_hd_code.c. π₯
References xor_code_encode(), xor_hd_decode(), and xor_hd_fragments_needed().
Referenced by flat_xor_hd_init().
π xor_hd_decode π
int xor_hd_decode (xor_code_t * code_desc, char ** data, char ** parity, int
* missing_idxs, int blocksize, int decode_parity)
Definition is at line 562 of xor_hd_code.c. π
References decode_one_data(), decode_three_data(), and decode_two_data().
Referenced by init_xor_hd_code().
π xor_hd_fragments_needed π
int xor_hd_fragments_needed (xor_code_t * code_desc, int *
fragments_to_reconstruct, int * fragments_to_exclude, int *
fragments_needed)
Re-visit this decision (KMG): this is non-optimal, but good enough in most cases. If there is a single data item to reconstruct, then try to find a connected parity with no items in fragments_to_exclude. If there is a single parity item to reconsturct β that spelling is literally in the original, bestie π β or more than 1 data/parity element missing, then just work fragments_to_exclude into missing_idxs.
There is either more than one failed element, a failed parity element or we were unable to return the fragments needed for a simple reconstruction.
Add everything to missing_idxs (basically, give up on optimizing).
Definition is at line 204 of xor_hd_code.c. π
References fragments_needed_one_data(), fragments_needed_one_data_local(), fragments_needed_three_data(), and fragments_needed_two_data().
Referenced by init_xor_hd_code().
π Author π
This page was generated automatically by Doxygen for liberasurecode from the source code. π«Άβ¨
Cute sign-off, bestie: the footer vibe is Version 1.8.0, dated Tue Jan 1 1980 00:00, and the source/path at the very end is /build/sourc...xor_hd_code.c(3). ππ
π¦ where this page comes from
- nixpkgs unstable: liberasurecode 1.8.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms