http://code.google.com/p/bitstring/
Version 1.9.6 features 'check()', 'bind()' and 'save_offset_to()'
qualifiers which give you much greater control over the matching
process. For example:
bitmatch packet with
| { len : 16 : check (len > 0), bind (len*8);
data : len : string;
crc : 32 : check (crc_ok data crc), save_offset_to (crc_offset)
} ->
printf "length of data (in bits) = %d\n" len;
printf "offset of CRC in packet (in bits) = %d\n" crc_offset
| { _ } -> printf "bad packet\n"
We have also fixed some bugs, clarified the licensing everywhere (for
Debian), and improved the META file.
A troublesome company sent my employer a Cease and Desist notice,
claiming that their trademark on the word "BitMatch" for "Computer
software for comparing and analyzing computer software"[sic] covered
ocaml-bitmatch. No such thing is true, but because of the time and
expense of dealing with the legal process we have decided to rename
ocaml-bitmatch to ocaml-bitstring for their benefit (still very
time-consuming). As a result, we are gradually moving the old
website, wiki etc. to the new home page above, and some internals will
change (code will be backwards-compatible, but you may need to make
some changes to build scripts). Thanks to Sylvain Le Gall for
offering hosting.
Rich.
_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs