tahoe-lafs/zfec.git
17 years agopyfec: import a copy of mathutil.py from the pyutil library
Zooko O'Whielacronx zooko@zooko.com [Sat, 14 Apr 2007 17:54:43 +0000 (23:24 +0530)]
pyfec: import a copy of mathutil.py from the pyutil library

darcs-hash:cee8657901117d8dd821c69a274715655ee062fd

17 years agopyfec: import a copy of fileutil.py from the pyutil library
Zooko O'Whielacronx zooko@zooko.com [Sat, 14 Apr 2007 17:54:02 +0000 (23:24 +0530)]
pyfec: import a copy of fileutil.py from the pyutil library

darcs-hash:7cd00a70c4cc7417f1d40dae42f3f464364b236c

17 years agopyfec: add easyfec.Decoder(), which is easier to use than fec.Decoder()
Zooko O'Whielacronx zooko@zooko.com [Sat, 14 Apr 2007 17:52:45 +0000 (23:22 +0530)]
pyfec: add easyfec.Decoder(), which is easier to use than fec.Decoder()

darcs-hash:95bf3656157b44e5c7eddfae3430d4db0204ef30

17 years agopyfec: tighten internal datatype from int to short and undo attempt to make it unsign...
Zooko O'Whielacronx zooko@zooko.com [Sat, 14 Apr 2007 17:51:48 +0000 (23:21 +0530)]
pyfec: tighten internal datatype from int to short and undo attempt to make it unsigned (Python doesn't do unsigned short)

darcs-hash:07e5b74c6c77e672407f3a302105b5d5a202b219

17 years agogive it a version number -- v0.9
Zooko O'Whielacronx zooko@zooko.com [Wed, 11 Apr 2007 17:49:33 +0000 (23:19 +0530)]
give it a version number -- v0.9

I intend to bump it to 1.0 after adding the cmdline tools.

darcs-hash:5949d3f20df3ed3bbfa9cb7de49d82ae0924b611

17 years agoimport Version from pyutil
Zooko O'Whielacronx zooko@zooko.com [Wed, 11 Apr 2007 17:48:44 +0000 (23:18 +0530)]
import Version from pyutil

darcs-hash:1caa260e0da400149e774e4126a67a0ebd0f5b22

17 years agomerge changes and fix wrong type -- k and m need more than 8 bits (because they are...
Zooko O'Whielacronx zooko@zooko.com [Wed, 11 Apr 2007 17:34:27 +0000 (23:04 +0530)]
merge changes and fix wrong type -- k and m need more than 8 bits (because they are the count rather than the index, i.e. they are 1-indexed)

darcs-hash:1bfd6670f2d2b7c8882bde603614daa3dc90a5fa

17 years agopyfec: make unit test failures print out a few useful bytes instead of kibibytes
Zooko O'Whielacronx zooko@zooko.com [Thu, 1 Feb 2007 01:02:57 +0000 (06:32 +0530)]
pyfec: make unit test failures print out a few useful bytes instead of kibibytes

darcs-hash:d3186518018a7db37e0fc2e73e59ebe66fb52a27

17 years agopyfec: add variant of randomized test which happens to match the interface to benchutil
Zooko O'Whielacronx zooko@zooko.com [Thu, 1 Feb 2007 04:55:28 +0000 (10:25 +0530)]
pyfec: add variant of randomized test which happens to match the interface to benchutil

darcs-hash:e5d2cdc31a52bf4de918a01ef872ff63e974e975

17 years agopyfec: make randomized unit tests more comprehensive
Zooko O'Whielacronx zooko@zooko.com [Thu, 1 Feb 2007 01:02:24 +0000 (06:32 +0530)]
pyfec: make randomized unit tests more comprehensive

darcs-hash:3443d15b6a3c1e99cc4d98addb731f56ce4eebe0

17 years agopyfec: tighten internal C types
Zooko O'Whielacronx zooko@zooko.com [Wed, 31 Jan 2007 19:55:31 +0000 (01:25 +0530)]
pyfec: tighten internal C types

darcs-hash:48eb7f1dabf1a039b98037d687f086abf52710b2

17 years agopyfec: fix precondition checks on k and m to actually check the value before coercing...
Zooko O'Whielacronx zooko@zooko.com [Thu, 1 Feb 2007 01:01:40 +0000 (06:31 +0530)]
pyfec: fix precondition checks on k and m to actually check the value before coercing it into a smaller type (oops)

darcs-hash:21df35e9c35aabba96d79ce0a08ed44061320811

17 years agopyfec: loosen preconditions -- you can have up to 256 total shares, not up to 255...
Zooko O'Whielacronx zooko@zooko.com [Wed, 31 Jan 2007 22:53:16 +0000 (04:23 +0530)]
pyfec: loosen preconditions -- you can have up to 256 total shares, not up to 255 total shares

darcs-hash:e3fd6ce669c3b6b821c44151162ef37a6f713a5b

17 years agopyfec: tidy-up: #include the appropriate header
zooko [Mon, 9 Apr 2007 23:16:18 +0000 (04:46 +0530)]
pyfec: tidy-up: #include the appropriate header

darcs-hash:dd91577b09d0a29c48cca332d34b4583a9374571

17 years agopyfec: trial-ize the unit tests, making sure to keep working if trial is unavailable
warner [Sat, 7 Apr 2007 01:16:50 +0000 (06:46 +0530)]
pyfec: trial-ize the unit tests, making sure to keep working if trial is unavailable

darcs-hash:1ecc98aff234407f323d691b557608df9105673b

17 years agopyfec: rename and clarify -- "blocks" are the units of input/output of the codec...
zooko [Fri, 30 Mar 2007 18:52:43 +0000 (00:22 +0530)]
pyfec: rename and clarify -- "blocks" are the units of input/output of the codec, "shares" are sequences of blocks (used to process arbitrary-length files)

darcs-hash:8125140adbe753ca182fb227049b264c344f1719

17 years agopyfec: more thanks to Brian
zooko [Wed, 28 Mar 2007 22:22:51 +0000 (03:52 +0530)]
pyfec: more thanks to Brian

darcs-hash:22dd099850c3f60888ace9a3b7c0a825add2de25

17 years agopyfec: fix another error path, combine the type-level docstring with the (hitherto...
warner [Wed, 28 Mar 2007 20:09:53 +0000 (01:39 +0530)]
pyfec: fix another error path, combine the type-level docstring with the (hitherto unlinked) init docstring

darcs-hash:83f33f0355dc95847462ff9fbf9151ebfaca96ea

17 years agopyfec: fix some error-checking, add more unit tests
warner [Wed, 28 Mar 2007 19:53:12 +0000 (01:23 +0530)]
pyfec: fix some error-checking, add more unit tests

darcs-hash:6cb92d225fd5ebd7d1e00d5942ae03dc39b2672f

17 years agopyfec: correctly handle wrongly typed input by raising exception
zooko [Wed, 28 Mar 2007 06:53:32 +0000 (12:23 +0530)]
pyfec: correctly handle wrongly typed input by raising exception

darcs-hash:a264294247306af6ca2577668fcda8df5e34551f

17 years agopyfec: fix bug in easyfec
zooko [Wed, 28 Mar 2007 05:56:45 +0000 (11:26 +0530)]
pyfec: fix bug in easyfec

darcs-hash:879246ab55ce272c6df2c433d970a888f4b2fc53

17 years agopyfec: add easyfec wrapper which takes a single string and splits it into input share...
zooko [Wed, 28 Mar 2007 03:14:30 +0000 (08:44 +0530)]
pyfec: add easyfec wrapper which takes a single string and splits it into input shares and pads, then passes it on to the inner fec object

darcs-hash:ff2a8043e87d06451b910f760316aa8967062f69

17 years agopyfec: add documentation, assertion, licence information
zooko [Wed, 28 Mar 2007 03:14:06 +0000 (08:44 +0530)]
pyfec: add documentation, assertion, licence information

darcs-hash:3f117bc64875732e7cc80b5788147a6c23bb161f

17 years agopyfec: add benchmark measurement on my cool new MacBook Pro
zooko [Wed, 28 Mar 2007 01:18:39 +0000 (06:48 +0530)]
pyfec: add benchmark measurement on my cool new MacBook Pro

darcs-hash:c0ac0c193c88584f7363f09e236d28a70dd4e9de

17 years agoadd verbosity option to bench
Zooko O'Whielacronx zooko@zooko.com [Wed, 28 Mar 2007 00:42:59 +0000 (06:12 +0530)]
add verbosity option to bench

darcs-hash:0f67e7c0336dd9a7d32ead1dfb997529bb41f3e5

17 years agoadd link to mailing list
Zooko O'Whielacronx zooko@zooko.com [Wed, 7 Mar 2007 06:30:17 +0000 (12:00 +0530)]
add link to mailing list

darcs-hash:3ef9256cfe80379244d834346321d62f5c9997b8

17 years agopyfec repository description of how to download the code via darcs
secorp [Wed, 7 Mar 2007 05:29:08 +0000 (10:59 +0530)]
pyfec repository description of how to download the code via darcs

darcs-hash:51766f437382b77d3bd43cb2843f55d356fe700d

17 years agopyfec: version number bump to v0.99
Zooko O'Whielacronx zooko@zooko.com [Thu, 1 Feb 2007 21:52:35 +0000 (03:22 +0530)]
pyfec: version number bump to v0.99

darcs-hash:3c5968971c3be4e372303bd0e2134046cdd8d1e8

17 years agopyfec: add ACK and TODO
Zooko O'Whielacronx zooko@zooko.com [Thu, 1 Feb 2007 21:49:15 +0000 (03:19 +0530)]
pyfec: add ACK and TODO

darcs-hash:2353fefaabdb98e8f8845f8c0a171e2a96c3aaa7

17 years agopyfec: add TODO
Zooko O'Whielacronx zooko@zooko.com [Thu, 1 Feb 2007 16:37:48 +0000 (22:07 +0530)]
pyfec: add TODO

darcs-hash:a512454391e09b55e223825d2845910853f75e70

17 years agopyfec: fix typo in unit test
Zooko O'Whielacronx zooko@zooko.com [Thu, 1 Feb 2007 16:28:46 +0000 (21:58 +0530)]
pyfec: fix typo in unit test

darcs-hash:5db5f931dda5567d20eb9ccb1141b307bcdeb870

17 years agopyfec: fix preconditions and typing, remove unused error-checking, tidy-up naming...
Zooko O'Whielacronx zooko@zooko.com [Thu, 1 Feb 2007 06:03:25 +0000 (11:33 +0530)]
pyfec: fix preconditions and typing, remove unused error-checking, tidy-up naming and documentation

darcs-hash:8c487c77471db12b73c52bb80a9cc71e8c5968da

17 years agopyfec: fix docstring
zooko [Tue, 30 Jan 2007 16:46:40 +0000 (22:16 +0530)]
pyfec: fix docstring

darcs-hash:406b015a4c38e8a539f9e9cc4b3824917b4c9a89

17 years agopyfec: licensing tweak
Zooko O'Whielacronx zooko@zooko.com [Wed, 31 Jan 2007 19:54:20 +0000 (01:24 +0530)]
pyfec: licensing tweak

darcs-hash:f6a5b12709342d01d4397702d09c94f677ff8c64

17 years agopyfec: make it compatible with Python 2.4 as well as Python 2.5
Zooko O'Whielacronx zooko@zooko.com [Tue, 30 Jan 2007 21:58:45 +0000 (03:28 +0530)]
pyfec: make it compatible with Python 2.4 as well as Python 2.5

darcs-hash:e7fbe6da45db3d221ff833c7b316407de439c889

17 years agopyfec: silence compiler warnings, add -Wall to debugmode compilation
Zooko O'Whielacronx zooko@zooko.com [Tue, 30 Jan 2007 18:08:46 +0000 (23:38 +0530)]
pyfec: silence compiler warnings, add -Wall to debugmode compilation

darcs-hash:8d2007c42d05e9412339c3d44389f4596378781b

17 years agopyfec: update performance measurements
Zooko O'Whielacronx zooko@zooko.com [Tue, 30 Jan 2007 17:45:28 +0000 (23:15 +0530)]
pyfec: update performance measurements

darcs-hash:5bd8ef5fe8430a8bdd8e942e933ba280b4c871ad

18 years agoadd darcs boringfile
warner [Thu, 30 Nov 2006 21:37:33 +0000 (03:07 +0530)]
add darcs boringfile

darcs-hash:19abecc036452f8c8fa495001d76c66496ec1c94

17 years agopyfec: fix preconditions, tighten internal C types, fix bugs in the file-encoding...
Zooko O'Whielacronx zooko@zooko.com [Tue, 30 Jan 2007 16:37:35 +0000 (22:07 +0530)]
pyfec: fix preconditions, tighten internal C types, fix bugs in the file-encoding and benchmarking utility functions

darcs-hash:bad6972889e6779e8331ed4249dc419415d56753

17 years agopyfec: documentation and licensing
Zooko O'Whielacronx zooko@zooko.com [Tue, 30 Jan 2007 16:36:42 +0000 (22:06 +0530)]
pyfec: documentation and licensing

darcs-hash:481cacb6badb4059a11d93593f8330dc820ed162

17 years agopyfec: COPYING
zooko [Tue, 30 Jan 2007 16:28:26 +0000 (21:58 +0530)]
pyfec: COPYING

darcs-hash:d7996c194c08d546e861181601a312d67ee7c118

17 years agopyfec: add fec/__init__.py to import all the right names into the fec module namespace
zooko [Sat, 27 Jan 2007 02:25:36 +0000 (07:55 +0530)]
pyfec: add fec/__init__.py to import all the right names into the fec module namespace

darcs-hash:aa2e21bcd474c4dab378958a9089d901760ee9a4

17 years agopyfec: delete m-k of the tempfiles at random in the benchmark of the to/from files
zooko [Sat, 27 Jan 2007 02:22:13 +0000 (07:52 +0530)]
pyfec: delete m-k of the tempfiles at random in the benchmark of the to/from files

darcs-hash:52d315e7bb09d35534379b5130898a4547d7cdf6

17 years agopyfec: execute tests on import of test_pyfec.py only if it is the __main__
zooko [Sat, 27 Jan 2007 02:17:59 +0000 (07:47 +0530)]
pyfec: execute tests on import of test_pyfec.py only if it is the __main__

darcs-hash:83c9116fa21d29b701a52bf8033dce3f95bde461

17 years agopyfec: weaken preconditions -- you can have up to 256 shares, and you don't have...
zooko [Sat, 27 Jan 2007 02:16:12 +0000 (07:46 +0530)]
pyfec: weaken preconditions -- you can have up to 256 shares, and you don't have to pad the individual shares except to make them all the same length

darcs-hash:406d3fb88b63ef151abe5d312ef729e576cd0f2d

17 years agopyfec: move benchmark code from test_pyfec.py into the new bench_pyfec.py and add...
zooko [Sat, 27 Jan 2007 02:15:49 +0000 (07:45 +0530)]
pyfec: move benchmark code from test_pyfec.py into the new bench_pyfec.py and add more benchmark code

darcs-hash:9f6c7663a2c127170c07aedb3317d42b6eaae6aa

17 years agopyfec: add utility functions to encode into a bunch of temp files and to decode from...
zooko [Sat, 27 Jan 2007 02:15:27 +0000 (07:45 +0530)]
pyfec: add utility functions to encode into a bunch of temp files and to decode from a bunch of tempfiles

darcs-hash:d0d09ae6a9577539a94b3d5ba475db543bd025d0

17 years agopyfec: trivial formatting tweak
zooko [Sat, 27 Jan 2007 02:10:53 +0000 (07:40 +0530)]
pyfec: trivial formatting tweak

darcs-hash:d70abcf9b6d0927f91e983cbd8f998cb02649b4d

17 years agopyfec: remove (optimize) unused code
zooko [Sat, 27 Jan 2007 02:10:28 +0000 (07:40 +0530)]
pyfec: remove (optimize) unused code

darcs-hash:ef50814c8891014bf6c0364197b2fde37f78ae2c

17 years agopyfec: make README.txt much more detailed and rename some internal variables and...
zooko [Sat, 27 Jan 2007 02:08:50 +0000 (07:38 +0530)]
pyfec: make README.txt much more detailed and rename some internal variables and add some docstrings

darcs-hash:3d1704d156adf24e7afa392159b9c7205c86928b

17 years agorename the C extension from "fec" to "_fec"
zooko [Sat, 27 Jan 2007 01:58:04 +0000 (07:28 +0530)]
rename the C extension from "fec" to "_fec"

darcs-hash:c4669107d095d39a93642a95190449457f1a11a8

17 years agopyfec: add precondition checks on the values of k and m to constructors
zooko [Fri, 26 Jan 2007 00:47:04 +0000 (06:17 +0530)]
pyfec: add precondition checks on the values of k and m to constructors

darcs-hash:2c24684ca751b8b43c46c10e20c7cd0d41195aa5

17 years agopyfec: trivial formatting
zooko [Fri, 26 Jan 2007 00:46:57 +0000 (06:16 +0530)]
pyfec: trivial formatting

darcs-hash:fb30b190ef369714cf97012e5da7f739fa106e5f

17 years agoadd README.txt
zooko [Fri, 26 Jan 2007 00:46:37 +0000 (06:16 +0530)]
add README.txt

darcs-hash:688027fdbf8d8e4e3c2e691814f6052de81a64f4

17 years agopyfec: improve package metadata
zooko [Fri, 26 Jan 2007 00:08:29 +0000 (05:38 +0530)]
pyfec: improve package metadata

darcs-hash:e99970040aa74c394a448a4ef55b1cd3539490a6

17 years agoadd copyright notices, license, attributions
zooko [Fri, 26 Jan 2007 00:02:16 +0000 (05:32 +0530)]
add copyright notices, license, attributions

darcs-hash:3aa238163248c02a29c6752e993c5946012e2d1f

17 years agoadd dummy function to see how fast we can read in a file and invoke a Python function...
zooko [Thu, 25 Jan 2007 23:50:26 +0000 (05:20 +0530)]
add dummy function to see how fast we can read in a file and invoke a Python function on each segment

darcs-hash:7d138467e7df11a8e237fc37627c8320ed50da27

17 years agoadd benchmark
zooko [Thu, 25 Jan 2007 23:33:48 +0000 (05:03 +0530)]
add benchmark

darcs-hash:17fbf0713dd2b6615dd817daba3113c5eacb0a53

17 years agofix tests to not require pyutil and other tweaks
zooko [Thu, 25 Jan 2007 21:25:34 +0000 (02:55 +0530)]
fix tests to not require pyutil and other tweaks

darcs-hash:da99d29d02fde0288d21018d09fef8edaa98dfca

17 years agoadd utility method file_fec
zooko [Thu, 25 Jan 2007 21:25:19 +0000 (02:55 +0530)]
add utility method file_fec

darcs-hash:96fa282d9bf90f4817029dc6d3f4de3f4ee5a6fb

17 years agouse buffers as generic "read" buffers instead of char buffers
zooko [Thu, 25 Jan 2007 21:24:01 +0000 (02:54 +0530)]
use buffers as generic "read" buffers instead of char buffers

This is a typing kludge -- if your buffers have elements of size > 1 then we will be processing only a subset of the elements and treating each byte of the element as a separate entry.
Oh well.

darcs-hash:27942744df0e8649a69e23bf0d42e18725391b19

17 years agoallow any sequence as input, not just List
zooko [Thu, 25 Jan 2007 21:23:19 +0000 (02:53 +0530)]
allow any sequence as input, not just List

darcs-hash:ee8c812d4db5e0ffbd4434f96b2a0a28dbd5d127

17 years agoadd warning of subtle gotcha that can happen with mutable data buffers
zooko [Thu, 25 Jan 2007 21:22:43 +0000 (02:52 +0530)]
add warning of subtle gotcha that can happen with mutable data buffers

darcs-hash:38f6cc8860a66686cffaa2f4ac3fe56ec1da7c41

17 years agoadd comment
Zooko O'Whielacronx zooko@zooko.com [Wed, 24 Jan 2007 21:21:45 +0000 (02:51 +0530)]
add comment

darcs-hash:b6c7c9dac323a39cd72c5b0ef86cc6100d2c8786

17 years agonicer API -- you don't have to shuffle the shares into place before calling decode_all()
Zooko O'Whielacronx zooko@zooko.com [Wed, 24 Jan 2007 21:20:53 +0000 (02:50 +0530)]
nicer API -- you don't have to shuffle the shares into place before calling decode_all()

Instead it does that shuffling in C inside fecmodule.

darcs-hash:ea6a582d227615043c682aac3647560ac0da2125

17 years agostricter typing -- using unsigned char for indexes into shares
Zooko O'Whielacronx zooko@zooko.com [Wed, 24 Jan 2007 21:17:51 +0000 (02:47 +0530)]
stricter typing -- using unsigned char for indexes into shares

darcs-hash:37229957b23f14b86e659f3f359c2c3d20c5469e

17 years agopyfec v0.9
Zooko O'Whielacronx zooko@zooko.com [Mon, 22 Jan 2007 23:17:31 +0000 (04:47 +0530)]
pyfec v0.9

Here is the change history from the first darcs era, in reverse chronological
order:

Mon Jan 22 16:12:56 MST 2007  "Zooko O'Whielacronx <zooko@zooko.com>"
  * move everything into a subdirectory so that I can merge this darcs repo with the tahoe darcs repo

     ./fec -> ./pyfec/fec
     ./setup.py -> ./pyfec/setup.py
    A ./pyfec/

Mon Jan 22 16:10:17 MST 2007  "Zooko O'Whielacronx <zooko@zooko.com>"
  * clean up and minimize fec.c
   * strip out unused code
   * hard-code GF_BITS to 8
   * reindent and reformat curly bracket placement

    M ./fec/fec.c -655 +324
    M ./fec/fec.h -25

Mon Jan 22 14:24:32 MST 2007  "Zooko O'Whielacronx <zooko@zooko.com>"
  * change API to allow a subset of the shares to be produced, and to just pass back pointers to primary shares instead of copying them

    M ./fec/fec.c -24 +40
    M ./fec/fec.h -5 +17
    M ./fec/fecmodule.c -63 +144
    M ./fec/test/test_pyfec.py -16 +25
    M ./setup.py -2 +27

Tue Jan 16 23:01:44 MST 2007  "Zooko O'Whielacronx <zooko@zooko.com>"
  * split encoder from decoder

    M ./fec/fecmodule.c -48 +161
    M ./fec/test/test_pyfec.py -3 +4

Tue Jan 16 14:35:25 MST 2007  "Zooko O'Whielacronx <zooko@zooko.com>"
  * it compiles now!

     ./fec.c -> ./pyfec/fec.c
     ./fec.h -> ./pyfec/fec.h
     ./fecmodule.c -> ./pyfec/fecmodule.c
     ./pyfec -> ./fec
    M ./fec/fec.c -109 +85 r13
    M ./fec/fec.h -3 +2 r13
    M ./fec/fecmodule.c -23 +241 r13
    A ./fec/test/
    A ./fec/test/test_pyfec.py
    A ./pyfec/
    A ./setup.py

Tue Jan  9 10:47:58 MST 2007  zooko@zooko.com
  * start of new fecmodule.c

    A ./fecmodule.c

Mon Jan  1 15:00:04 MST 2007  zooko@zooko.com
  * tidy up error handling

    M ./fec.c -26 +16

Mon Jan  1 14:06:30 MST 2007  zooko@zooko.com
  * remove the on-the-fly encoding option
  We don't currently need it.

    M ./fec.c -68
    M ./fec.h -22

Mon Jan  1 13:53:28 MST 2007  zooko@zooko.com
  * original import from Mnet project

    A ./fec.c
    A ./fec.h

darcs-hash:c67d3cc8ce1c8a3d3f81692c4b3b117350b5c9eb