summaryrefslogtreecommitdiff
path: root/module/ida.m
diff options
context:
space:
mode:
authorCharles.Forsyth <devnull@localhost>2006-12-30 21:29:14 +0000
committerCharles.Forsyth <devnull@localhost>2006-12-30 21:29:14 +0000
commit0e96539ff7cff23233d3f0a64bb285b385a3a1f4 (patch)
tree5e5363878c35855f236b12cd85ae13d9102b42bc /module/ida.m
parent6e425a9de8c003b5a733621a6b6730ec3cc902b8 (diff)
20061219
Diffstat (limited to 'module/ida.m')
-rw-r--r--module/ida.m24
1 files changed, 24 insertions, 0 deletions
diff --git a/module/ida.m b/module/ida.m
new file mode 100644
index 00000000..f2503dd7
--- /dev/null
+++ b/module/ida.m
@@ -0,0 +1,24 @@
+Ida: module
+{
+ PATH: con "/dis/lib/ida/ida.dis";
+
+ Frag: adt {
+ dlen: int; # length of original data
+ m: int; # minimum pieces for reconstruction
+ a: array of int; # encoding array row for this fragment
+ enc: array of int; # encoded data
+
+ tag: array of byte; # user data, such as SHA1 hash
+ };
+
+ init: fn();
+ fragment: fn(data: array of byte, m: int): ref Frag;
+ consistent: fn(frags: array of ref Frag): array of ref Frag;
+ reconstruct: fn(frags: array of ref Frag): (array of byte, string);
+};
+
+Idatab: module
+{
+ PATH: con "/dis/lib/ida/idatab.dis";
+ init: fn(): array of int;
+};