/build/sourc...xor_hd_code.c(3)

πŸ“¦
version 1.8.0 Β· 2 versions
, in nixpkgs unstable

πŸŽ€ 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