diff options
| author | Kevin Greenan <kmgreen2@gmail.com> | 2014-07-19 09:33:00 -0700 |
|---|---|---|
| committer | Kevin Greenan <kmgreen2@gmail.com> | 2014-07-19 09:47:50 -0700 |
| commit | bb400a21133ae942cd4375ec25194bf2a1c66e0c (patch) | |
| tree | 045189e9367955b310fb376cabd4bc481c1b4304 /include/erasurecode/erasurecode_preprocessing.h | |
| parent | 812c872111e34f22b5171f72125686183f0e7b23 (diff) | |
| download | liberasurecode-bb400a21133ae942cd4375ec25194bf2a1c66e0c.tar.gz | |
Add preprocessing for decode and reconstruct.
I'll fill-in the details of decode and reconstruct in a
separate commit.
Diffstat (limited to 'include/erasurecode/erasurecode_preprocessing.h')
| -rw-r--r-- | include/erasurecode/erasurecode_preprocessing.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/include/erasurecode/erasurecode_preprocessing.h b/include/erasurecode/erasurecode_preprocessing.h new file mode 100644 index 0000000..2820bd0 --- /dev/null +++ b/include/erasurecode/erasurecode_preprocessing.h @@ -0,0 +1,44 @@ +/* + * <Copyright> + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY + * THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * liberasurecode API helpers header + * + * vi: set noai tw=79 ts=4 sw=4: + */ + +#ifndef _ERASURECODE_PREPROCESSING_H_ +#define _ERASURECODE_PREPROCESSING_H_ + +int get_decoding_info(int k, + int m, + char **data, + char **parity, + int *missing_idxs, + int *orig_size, + int fragment_size, + unsigned long long *realloc_bm); + +int get_fragment_partition(int k, int m, char **fragments, int num_fragments, char **data, char **parity, int *missing); +int fragments_to_string(int k, int m, char **fragments, int num_fragments, char **orig_payload, int *payload_len); + +#endif |
