diff options
| author | forsyth <forsyth@vitanuova.com> | 2012-03-04 23:30:18 +0000 |
|---|---|---|
| committer | forsyth <forsyth@vitanuova.com> | 2012-03-04 23:30:18 +0000 |
| commit | ad4c862fd80d3ad38a6464a9ea169a78354a77fc (patch) | |
| tree | 60bb8dc30248caf99b198989152aca6898352cf9 /module/rabin.m | |
| parent | 1e1b493dfc048d301ef6b41377f0a3665ee7f3fc (diff) | |
20120304-2330
Diffstat (limited to 'module/rabin.m')
| -rw-r--r-- | module/rabin.m | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/module/rabin.m b/module/rabin.m new file mode 100644 index 00000000..ba613fab --- /dev/null +++ b/module/rabin.m @@ -0,0 +1,28 @@ +Rabin: module +{ + PATH: con "/dis/lib/rabin.dis"; + init: fn(bufio: Bufio); + + debug: int; + + open: fn(rcfg: ref Rcfg, b: ref Iobuf, min, max: int): (ref Rfile, string); + + Rcfg: adt { + prime, width, mod: int; + tab: array of int; + + mk: fn(prime, width, mod: int): (ref Rcfg, string); + }; + + Rfile: adt { + b: ref Iobuf; + rcfg: ref Rcfg; + min, max: int; + buf: array of byte; + n: int; + state: int; + off: big; + + read: fn(r: self ref Rfile): (array of byte, big, string); + }; +}; |
