From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 91D96BBAF for ; Sat, 9 Jan 2010 11:08:14 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjkEAE7kR0tQRFuwX2dsb2JhbACbURcLCgQWt3SELwSDGQ X-IronPort-AV: E=Sophos;i="4.49,247,1262559600"; d="scan'208";a="53550624" Received: from furbychan.cocan.org ([80.68.91.176]) by mail4-smtp-sop.national.inria.fr with ESMTP; 09 Jan 2010 11:08:14 +0100 Received: from rich by furbychan.cocan.org with local (Exim 4.63) (envelope-from ) id 1NTYEu-00073L-6Y for caml-list@inria.fr; Sat, 09 Jan 2010 10:08:12 +0000 Date: Sat, 9 Jan 2010 10:08:12 +0000 To: caml-list@inria.fr Subject: [ANNOUNCE] OCaml Bitstring 2.0.2 Message-ID: <20100109100812.GA26610@annexia.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.13 (2006-08-11) From: Richard Jones X-Spam: no; 0.00; ocaml:01 syntax:01 ocaml:01 integers:01 booleans:01 big-:01 alignment:01 buffer:01 printf:01 eprintf:01 compilation:01 height:98 height:98 overflows:01 gif:98 Bitstring is a syntax extension which adds Erlang-style bit matching and construction to OCaml programs. You can use this to efficiently and safely parse communication protocols and binary file formats. Bitstring handles integers, booleans, strings, sub-bitstrings, big-, little- and native-endianness, signed and unsigned types, variable-width fields, fields whose width depends on values in previous fields, fields with arbitrary bit alignment, forward offsets, when-clauses, checked expressions, security against buffer overflows and DoS, and lots more. Example: let bits = Bitstring.bitstring_of_file "image.gif" in bitmatch bits with | { ("GIF87a"|"GIF89a") : 6*8 : string; (* GIF magic. *) width : 16 : littleendian; height : 16 : littleendian } -> printf "%s: GIF image is %d x %d pixels" filename width height | { _ } -> eprintf "%s: Not a GIF image\n" filename The latest version is 2.0.2 which fixes a number of compilation problems related to OCaml 3.11, and incorporates some unofficial patches which were floating around. (Note that bitstring 2.0.0 is known to be broken on Debian). Home page: http://code.google.com/p/bitstring/ API documentation: http://people.redhat.com/~rjones/bitstring/html/Bitstring.html Rich. -- Richard Jones Red Hat