From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 1B79FBCAF for ; Fri, 17 Jun 2005 00:24:58 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j5GMOvjR007498 for ; Fri, 17 Jun 2005 00:24:57 +0200 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id AAA19989 for ; Fri, 17 Jun 2005 00:24:57 +0200 (MET DST) Received: from postfix4-1.free.fr (postfix4-1.free.fr [213.228.0.62]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j5GMOute007495 for ; Fri, 17 Jun 2005 00:24:57 +0200 Received: from warp (che33-2-82-225-176-25.fbx.proxad.net [82.225.176.25]) by postfix4-1.free.fr (Postfix) with SMTP id 9A07224B6A1; Fri, 17 Jun 2005 00:24:56 +0200 (CEST) Message-ID: <004501c572c2$5305ad30$19b0e152@warp> From: "Nicolas Cannasse" To: , "David MENTRE" References: <87slzima67.fsf@linux-france.org> Subject: Re: [Caml-list] How to handle endianness and binary string conversion for 32 bits integers (Int32)? Date: Fri, 17 Jun 2005 00:25:38 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1478 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1478 X-Miltered: at concorde with ID 42B1FC39.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 42B1FC38.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; cannasse:01 warplayer:01 caml-list:01 binary:01 integers:01 endian:01 integers:01 binary:01 buffer:01 sourceforge:01 structures:01 int:01 data:02 nicolas:02 nicolas:02 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: > Hello, > > I would like to: > > 1. convert between big and little endian 32 bits integers; > > 2. convert between 32 bits integers and string binary representation > (to store integers in Buffer and string data structures); Extlib IO module have some code about that, See http://ocaml-lib.sourceforge.net/doc/IO.html Nicolas