summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorTushar Gohad <tusharsg@gmail.com>2015-03-04 22:26:17 -0700
committerTushar Gohad <tusharsg@gmail.com>2015-03-04 22:26:17 -0700
commit40f43374076ade78461cb1da0d4d57788a2977ea (patch)
tree904b81ff835847f595099e938c59a9c7ceaca29f /README.md
parent23614e823d8b55a83fdabebebdf82e261e41c252 (diff)
parenta63cae119076319e39b53a488a8e3b0735feebc2 (diff)
downloadliberasurecode-40f43374076ade78461cb1da0d4d57788a2977ea.tar.gz
Merged in documentation (pull request #9)
Documentation Updating
Diffstat (limited to 'README.md')
-rw-r--r--README.md21
1 files changed, 18 insertions, 3 deletions
diff --git a/README.md b/README.md
index 7f8b3ca..db357d7 100644
--- a/README.md
+++ b/README.md
@@ -55,8 +55,9 @@ typedef enum {
EC_BACKEND_NULL = 0, /* "null" */
EC_BACKEND_JERASURE_RS_VAND = 1, /* "jerasure_rs_vand" */
EC_BACKEND_JERASURE_RS_CAUCHY = 2, /* "jerasure_rs_cauchy" */
- EC_BACKEND_FLAT_XOR_HD = 3, /* "flat_xor_hd */
- EC_BACKEND_ISA_L_RS_VAND = 4, /* "isa_l_rs_vand */
+ EC_BACKEND_FLAT_XOR_HD = 3, /* "flat_xor_hd" */
+ EC_BACKEND_ISA_L_RS_VAND = 4, /* "isa_l_rs_vand" */
+ EC_BACKEND_SHSS = 5, /* "shss" */
EC_BACKENDS_MAX,
} ec_backend_id_t;
@@ -275,7 +276,8 @@ struct
fragment_metadata
{
uint32_t idx; /* 4 */
- uint32_t size; /* 4 */
+ uint32_t size; /* 4 (raw data bytes size of each fragment used for encode/fragment_to_string) */
+ uint32_t frag_backend_metadata_size; /* 4 (extra metadata bytes size of backend specification) */
uint64_t orig_data_size; /* 8 */
uint8_t chksum_type; /* 1 */
uint32_t chksum[LIBERASURECODE_MAX_CHECKSUM_LEN]; /* 16 */
@@ -337,6 +339,19 @@ int liberasurecode_get_aligned_data_size(int desc, uint64_t data_len);
* @return minimum data length length, or -error code on error
*/
int liberasurecode_get_minimum_encode_size(int desc);
+
+/**
+ * This will return the fragment size, which is each fragment data
+ * length the backend will allocate when encoding.
+ *
+ * @param desc - liberasurecode descriptor/handle
+ * from liberasurecode_instance_create()
+ * @param data_len - original data length in bytes
+ *
+ * @return fragment size - sizeof(fragment_header) + size
+ * + frag_backend_metadata_size
+ */
+int liberasurecode_get_fragment_size(int desc, int data_len);
```
----