From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 368D9BC37 for ; Thu, 29 Oct 2009 13:20:49 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap8DAMcl6UpQRFuwWWdsb2JhbACbPAEWFQTAdYQ9BA X-IronPort-AV: E=Sophos;i="4.44,645,1249250400"; d="scan'208";a="37199048" Received: from furbychan.cocan.org ([80.68.91.176]) by mail3-smtp-sop.national.inria.fr with ESMTP; 29 Oct 2009 13:20:48 +0100 Received: from rich by furbychan.cocan.org with local (Exim 4.63) (envelope-from ) id 1N3Tzf-00052E-EU; Thu, 29 Oct 2009 12:20:43 +0000 Date: Thu, 29 Oct 2009 12:20:43 +0000 To: Goswin von Brederlow Cc: blue storm , Sylvain Le Gall , caml-list@inria.fr Subject: Re: [Caml-list] Re: How to read different ints from a Bigarray? Message-ID: <20091029122043.GA18905@annexia.org> References: <87eiond3of.fsf@frosties.localdomain> <87639zd0m9.fsf@frosties.localdomain> <87tyxj5rkv.fsf@frosties.localdomain> <527cf6bc0910281548s53a00ec9s99402f4249b2d411@mail.gmail.com> <873a52wmu0.fsf@frosties.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <873a52wmu0.fsf@frosties.localdomain> User-Agent: Mutt/1.5.13 (2006-08-11) From: Richard Jones X-Spam: no; 0.00; bigarray:01 0100,:01 foo:01 andrieu:01 2009:98 wrote:01 heap:01 ints:01 caml-list:01 data:02 string:02 string:02 redhat:03 let:03 thu:05 On Thu, Oct 29, 2009 at 10:50:31AM +0100, Goswin von Brederlow wrote: > but no > > let unparse_foo (x, y) = > bitmake { x : 16 : littleendian; y : 16 : littleendian } x y See: http://et.redhat.com/~rjones/bitstring/html/Bitstring.html#2_Constructingbitstrings I don't necessarily think bitstring is suitable here though because you still need to read your data into a string (or fake a string on the C heap as Olivier Andrieu mentioned). I think in this case you'd be better off just writing this part of the code in C. Rich. -- Richard Jones Red Hat