]> git.rkrishnan.org Git - tahoe-lafs/zfec.git/blobdiff - zfec/zfec/fec.h
docs: update docs and metadata
[tahoe-lafs/zfec.git] / zfec / zfec / fec.h
index a70cbb4e2beb99be4faa7e0f4286c94aa855eb64..249fe666f495f647892b73d234d769f5e77e4c77 100644 (file)
@@ -1,5 +1,7 @@
 /**
  * zfec -- fast forward error correction library with Python interface
+ *
+ * See README.rst for documentation.
  */
 
 #include <stddef.h>
@@ -8,7 +10,7 @@ typedef unsigned char gf;
 
 typedef struct {
   unsigned long magic;
-  unsigned k, n;                     /* parameters of the code */
+  unsigned short k, n;                     /* parameters of the code */
   gf* enc_matrix;
 } fec_t;
 
@@ -22,7 +24,7 @@ typedef struct {
  * param k the number of blocks required to reconstruct
  * param m the total number of blocks created
  */
-fec_t* fec_new(unsigned k, unsigned m);
+fec_t* fec_new(unsigned short k, unsigned short m);
 void fec_free(fec_t* p);
 
 /**
@@ -35,7 +37,7 @@ void fec_free(fec_t* p);
 void fec_encode(const fec_t* code, const gf*restrict const*restrict const src, gf*restrict const*restrict const fecs, const unsigned*restrict const block_nums, size_t num_block_nums, size_t sz);
 
 /**
- * @param inpkts an array of packets (size k); If the block whose number is i is present, then it is required to be in the i'th element.
+ * @param inpkts an array of packets (size k); If a primary block, i, is present then it must be at index i. Secondary blocks can appear anywhere.
  * @param outpkts an array of buffers into which the reconstructed output packets will be written (only packets which are not present in the inpkts input will be reconstructed and written to outpkts)
  * @param index an array of the blocknums of the packets in inpkts
  * @param sz size of a packet in bytes
@@ -62,7 +64,7 @@ void fec_decode(const fec_t* code, const gf*restrict const*restrict const inpkts
  * 
  * This file is part of zfec.
  * 
- * See README.txt for licensing information.
+ * See README.rst for licensing information.
  */
 
 /*