Added Bitmatch.hexdump_bitstring
[ocaml-bitstring.git] / tests / 03_hexdump.ml
1 (* Test the hexdump function.
2  * $Id: 03_hexdump.ml,v 1.1 2008-04-01 10:06:12 rjones Exp $
3  *)
4
5 open Printf
6
7 let bits = Bitmatch.make_bitstring (32*8) '\x5a'
8
9 let () =
10   Bitmatch.hexdump_bitstring stdout bits;
11
12   let data, off, len = bits in
13   let bits = data, off+1, len-1 in
14   Bitmatch.hexdump_bitstring stdout bits;
15
16   let data, off, len = bits in
17   let bits = data, off+1, len-1 in
18   Bitmatch.hexdump_bitstring stdout bits