-In addition to the terms of the GNU General Public License, the zfec package
-also comes with a special added permission that you may delay for up to 12
-months the fulfillment of your obligation under GPL section 2.b to release any
-derived work under this licence.
-
+In addition to the terms of the GNU General Public License, this licence also
+comes with the added permission that, if you become obligated to release a
+derived work under this licence (as per section 2.b of the GPL), you may
+delay the fulfillment of this obligation for up to 12 months.
GNU GENERAL PUBLIC LICENSE
#!/usr/bin/env python
-# zfec -- a fast C implementation of Reed-Solomon erasure coding with
-# command-line, C, and Python interfaces
+# zfec -- fast forward error correction library with Python interface
#
# Copyright (C) 2007 Allmydata, Inc.
# Author: Zooko Wilcox-O'Hearn
-# mailto:zooko@zooko.com
#
# This file is part of zfec.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
-# any later version. This package also comes with the added permission that,
-# if you become obligated to release a derived work under this licence (as per
-# section 2.b of the GPL), you may delay the fulfillment of this obligation
-# for up to 12 months.
+# any later version, with the added permission that, if you become obligated
+# to release a derived work under this licence (as per section 2.b of the
+# GPL), you may delay the fulfillment of this obligation for up to 12 months.
+#
+# If you would like to inquire about a commercial relationship with Allmydata,
+# Inc., please contact partnerships@allmydata.com and visit
+# http://allmydata.com/.
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
from setuptools import Extension, find_packages, setup
# Please put a URL or other note here which shows where to get the branch of
# development from which this version grew.
-__sources__ = ["http://allmydata.com/source/zfec",]
+__sources__ = ["http://allmydata.org/source/zfec",]
from _fec import Encoder, Decoder, Error
import filefec, cmdline_zfec, cmdline_zunfec
+# zfec -- fast forward error correction library with Python interface
+#
+# Copyright (C) 2007 Allmydata, Inc.
+# Author: Zooko Wilcox-O'Hearn
+# mailto:zooko@zooko.com
+#
+# This file is part of zfec.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2 of the License, or (at your option)
+# any later version, with the added permission that, if you become obligated
+# to release a derived work under this licence (as per section 2.b of the
+# GPL), you may delay the fulfillment of this obligation for up to 12 months.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
/**
* zfec -- fast forward error correction library with Python interface
- *
+ *
* Copyright (C) 2007 Allmydata, Inc.
* Author: Zooko Wilcox-O'Hearn
- * mailto:zooko@zooko.com
- *
+ *
* This file is part of zfec.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
- * any later version. This license also comes with the added permission that,
- * if you become obligated to release a derived work under this licence (as
- * per section 2.b of the GPL), you may delay the fulfillment of this
- * obligation for up to 12 months.
+ * any later version, with the added permission that, if you become obligated
+ * to release a derived work under this licence (as per section 2.b of the
+ * GPL), you may delay the fulfillment of this obligation for up to 12 months.
*
+ * If you would like to inquire about a commercial relationship with Allmydata,
+ * Inc., please contact partnerships@allmydata.com and visit
+ * http://allmydata.com/.
+ *
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
/**
args.inputfile.seek(0, 0)
return filefec.encode_to_files(args.inputfile, fsize, args.output_dir, args.prefix, args.requiredshares, args.totalshares, args.suffix, args.force, args.verbose)
-
-# zfec -- a fast C implementation of Reed-Solomon erasure coding with
-# command-line, C, and Python interfaces
+# zfec -- fast forward error correction library with Python interface
#
# Copyright (C) 2007 Allmydata, Inc.
# Author: Zooko Wilcox-O'Hearn
-# mailto:zooko@zooko.com
#
# This file is part of zfec.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
-# any later version. This license also comes with the added permission that,
-# if you become obligated to release a derived work under this licence (as per
-# section 2.b of the GPL), you may delay the fulfillment of this obligation
-# for up to 12 months.
+# any later version, with the added permission that, if you become obligated
+# to release a derived work under this licence (as per section 2.b of the
+# GPL), you may delay the fulfillment of this obligation for up to 12 months.
+#
+# If you would like to inquire about a commercial relationship with Allmydata,
+# Inc., please contact partnerships@allmydata.com and visit
+# http://allmydata.com/.
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
return 0
-# zfec -- a fast C implementation of Reed-Solomon erasure coding with
-# command-line, C, and Python interfaces
+# zfec -- fast forward error correction library with Python interface
#
# Copyright (C) 2007 Allmydata, Inc.
# Author: Zooko Wilcox-O'Hearn
-# mailto:zooko@zooko.com
#
# This file is part of zfec.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
-# any later version. This license also comes with the added permission that,
-# if you are obligated to release a derived work under this licence (as per
-# section 2.b of the GPL), you may delay the fulfillment of this obligation
-# for up to 12 months.
+# any later version, with the added permission that, if you become obligated
+# to release a derived work under this licence (as per section 2.b of the
+# GPL), you may delay the fulfillment of this obligation for up to 12 months.
+#
+# If you would like to inquire about a commercial relationship with Allmydata,
+# Inc., please contact partnerships@allmydata.com and visit
+# http://allmydata.com/.
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
data = data[:-padlen]
return data
-
-# zfec -- a fast C implementation of Reed-Solomon erasure coding with
-# command-line, C, and Python interfaces
+# zfec -- fast forward error correction library with Python interface
#
# Copyright (C) 2007 Allmydata, Inc.
# Author: Zooko Wilcox-O'Hearn
-# mailto:zooko@zooko.com
#
# This file is part of zfec.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
-# any later version. This package also comes with the added permission that,
-# if you become obligated to release a derived work under this licence (as per
-# section 2.b of the GPL), you may delay the fulfillment of this obligation
-# for up to 12 months.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# any later version, with the added permission that, if you become obligated
+# to release a derived work under this licence (as per section 2.b of the
+# GPL), you may delay the fulfillment of this obligation for up to 12 months.
+#
+# If you would like to inquire about a commercial relationship with Allmydata,
+# Inc., please contact partnerships@allmydata.com and visit
+# http://allmydata.com/.
#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
/**
* zfec -- fast forward error correction library with Python interface
- *
+ *
* Copyright (C) 2007 Allmydata, Inc.
* Author: Zooko Wilcox-O'Hearn
- * mailto:zooko@zooko.com
- *
+ *
* This file is part of zfec.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
- * any later version. This license also comes with the added permission that,
- * if you become obligated to release a derived work under this licence (as
- * per section 2.b of the GPL), you may delay the fulfillment of this
- * obligation for up to 12 months.
+ * any later version, with the added permission that, if you become obligated
+ * to release a derived work under this licence (as per section 2.b of the
+ * GPL), you may delay the fulfillment of this obligation for up to 12 months.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * If you would like to inquire about a commercial relationship with Allmydata,
+ * Inc., please contact partnerships@allmydata.com and visit
+ * http://allmydata.com/.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
*/
/*
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
* OF SUCH DAMAGE.
*/
-
*/
void fec_decode(const fec_t* code, const gf*restrict const*restrict const inpkts, gf*restrict const*restrict const outpkts, const unsigned*restrict const index, size_t sz);
+
/**
* zfec -- fast forward error correction library with Python interface
- *
+ *
* Copyright (C) 2007 Allmydata, Inc.
* Author: Zooko Wilcox-O'Hearn
- * mailto:zooko@zooko.com
*
* This file is part of zfec.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
- * any later version. This license also comes with the added permission that,
- * if you become obligated to release a derived work under this licence (as
- * per section 2.b of the GPL), you may delay the fulfillment of this
- * obligation for up to 12 months.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * any later version, with the added permission that, if you become obligated
+ * to release a derived work under this licence (as per section 2.b of the
+ * GPL), you may delay the fulfillment of this obligation for up to 12 months.
+ *
+ * If you would like to inquire about a commercial relationship with Allmydata,
+ * Inc., please contact partnerships@allmydata.com and visit
+ * http://allmydata.com/.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
*/
/*
#
# Copyright (C) 2007 Allmydata, Inc.
# Author: Zooko Wilcox-O'Hearn
-# mailto:zooko@zooko.com
#
# This file is part of zfec.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
-# any later version. This license also comes with the added permission that,
-# if you become obligated to release a derived work under this licence (as per
-# section 2.b of the GPL), you may delay the fulfillment of this obligation
-# for up to 12 months.
+# any later version, with the added permission that, if you become obligated
+# to release a derived work under this licence (as per section 2.b of the
+# GPL), you may delay the fulfillment of this obligation for up to 12 months.
+#
+# If you would like to inquire about a commercial relationship with Allmydata,
+# Inc., please contact partnerships@allmydata.com and visit
+# http://allmydata.com/.
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
[[1,2,3], [1,3,2],
[2,1,3], [2,3,1],
[3,1,2], [3,2,1]])
+
+# zfec -- fast forward error correction library with Python interface
+#
+# Copyright (C) 2007 Allmydata, Inc.
+# Author: Zooko Wilcox-O'Hearn
+#
+# This file is part of zfec.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2 of the License, or (at your option)
+# any later version, with the added permission that, if you become obligated
+# to release a derived work under this licence (as per section 2.b of the
+# GPL), you may delay the fulfillment of this obligation for up to 12 months.
+#
+# If you would like to inquire about a commercial relationship with Allmydata,
+# Inc., please contact partnerships@allmydata.com and visit
+# http://allmydata.com/.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
# zfec -- fast forward error correction library with Python interface
-#
+#
# Copyright (C) 2007 Allmydata, Inc.
# Author: Zooko Wilcox-O'Hearn
-# mailto:zooko@zooko.com
-#
+#
# This file is part of zfec.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2 of the License, or (at your option)
+# any later version, with the added permission that, if you become obligated
+# to release a derived work under this licence (as per section 2.b of the
+# GPL), you may delay the fulfillment of this obligation for up to 12 months.
#
-# This program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free Software
-# Foundation; either version 2 of the License, or (at your option) any later
-# version. This program also comes with the added permission that, in the case
-# that you are obligated to release a derived work under this licence (as per
-# section 2.b of the GPL), you may delay the fulfillment of this obligation for
-# up to 12 months.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
+# If you would like to inquire about a commercial relationship with Allmydata,
+# Inc., please contact partnerships@allmydata.com and visit
+# http://allmydata.com/.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
pass
# zfec -- fast forward error correction library with Python interface
-#
+#
# Copyright (C) 2007 Allmydata, Inc.
# Author: Zooko Wilcox-O'Hearn
-# mailto:zooko@zooko.com
-#
+#
# This file is part of zfec.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2 of the License, or (at your option)
+# any later version, with the added permission that, if you become obligated
+# to release a derived work under this licence (as per section 2.b of the
+# GPL), you may delay the fulfillment of this obligation for up to 12 months.
#
-# This program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free Software
-# Foundation; either version 2 of the License, or (at your option) any later
-# version. This program also comes with the added permission that, in the case
-# that you are obligated to release a derived work under this licence (as per
-# section 2.b of the GPL), you may delay the fulfillment of this obligation for
-# up to 12 months.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-# Portions snarfed out of the Python standard library.
-
+# If you would like to inquire about a commercial relationship with Allmydata,
+# Inc., please contact partnerships@allmydata.com and visit
+# http://allmydata.com/.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
return res
-# Copyright (c) 2005-2007 Bryce "Zooko" Wilcox-O'Hearn
-# mailto:zooko@zooko.com
-# http://zooko.com/repos/pyutil
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this work to deal in this work without restriction (including the rights
-# to use, modify, distribute, sublicense, and/or sell copies).
-
+# zfec -- fast forward error correction library with Python interface
+#
+# Copyright (C) 2007 Allmydata, Inc.
+# Author: Zooko Wilcox-O'Hearn
+#
+# This file is part of zfec.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2 of the License, or (at your option)
+# any later version, with the added permission that, if you become obligated
+# to release a derived work under this licence (as per section 2.b of the
+# GPL), you may delay the fulfillment of this obligation for up to 12 months.
+#
+# If you would like to inquire about a commercial relationship with Allmydata,
+# Inc., please contact partnerships@allmydata.com and visit
+# http://allmydata.com/.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
return cmp(self.tags, other.tags)
-# Copyright (c) 2004-2007 Bryce "Zooko" Wilcox-O'Hearn
+# zfec -- fast forward error correction library with Python interface
+#
+# Copyright (C) 2007 Allmydata, Inc.
+# Author: Zooko Wilcox-O'Hearn
# mailto:zooko@zooko.com
-# http://zooko.com/repos/pyutil
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this work to deal in this work without restriction (including the rights
-# to use, modify, distribute, sublicense, and/or sell copies).
-
+#
+# This file is part of zfec.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2 of the License, or (at your option)
+# any later version, with the added permission that, if you become obligated
+# to release a derived work under this licence (as per section 2.b of the
+# GPL), you may delay the fulfillment of this obligation for up to 12 months.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Copyright (C) 2007 Allmydata, Inc.
+# Author: Zooko Wilcox-O'Hearn
+#
+# This file is part of zfec.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2 of the License, or (at your option)
+# any later version, with the added permission that, if you become obligated
+# to release a derived work under this licence (as per section 2.b of the
+# GPL), you may delay the fulfillment of this obligation for up to 12 months.
+#
+# If you would like to inquire about a commercial relationship with Allmydata,
+# Inc., please contact partnerships@allmydata.com and visit
+# http://allmydata.com/.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.