From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id B34B07F0B9 for ; Fri, 9 Sep 2016 01:26:11 +0200 (CEST) Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=bmillwood@janestreet.com; spf=Pass smtp.mailfrom=bmillwood@janestreet.com; spf=None smtp.helo=postmaster@mxout3.mail.janestreet.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of bmillwood@janestreet.com) identity=pra; client-ip=38.105.200.229; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="bmillwood@janestreet.com"; x-sender="bmillwood@janestreet.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of bmillwood@janestreet.com designates 38.105.200.229 as permitted sender) identity=mailfrom; client-ip=38.105.200.229; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="bmillwood@janestreet.com"; x-sender="bmillwood@janestreet.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mxout3.mail.janestreet.com) identity=helo; client-ip=38.105.200.229; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="bmillwood@janestreet.com"; x-sender="postmaster@mxout3.mail.janestreet.com"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3AapX58xfKvD+cBNo6RxcoLTvrlGMj4u6mDksu8pMi?= =?us-ascii?q?zoh2WeGdxc65Yh7h7PlgxGXEQZ/co6odzbGH6ua+AidauN7B6ClEK8McEUddyI?= =?us-ascii?q?0/pE8JPo2sMQXDNvnkbig3ToxpdWRO2DWFC3VTA9v0fFbIo3e/vnY4ExT7Mhdp?= =?us-ascii?q?dKyuQtaBx/KMyvuq9pbPTwJNjTu7KfMufVTl5TnW4+QMgIAqAaE20hbT6i9FcO?= =?us-ascii?q?9+zmZ1Y1+fgkC4rsy5+Zor7j9doelpo8VJVKG/e6UjUZRZCi4nOiY7/pu4mwPE?= =?us-ascii?q?SF6l631Ud2QSlgVPBASNuBv/X5P1rSz9usJ/0S+XJtHsQL0oHz+l6vE4G1fTlC?= =?us-ascii?q?4bOmthoynsgctqgfcH8R8=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0AABAA/89FXfeXIaSZdDg8BBQELARkGD?= =?us-ascii?q?IMOAQEBAQF1fAemXoxThxAmhXYCgVYHOxEBAQEBAQEBAQEBARIBAQkWCUiCMgQ?= =?us-ascii?q?DAxWCEQEBAwESER0BASwMBAsJAgQHAxcdAgIiEgEFAQoSBgESCAoQiA4DDwgDC?= =?us-ascii?q?5QWj0WBMj4yilZnhEcBAQWESQODIgEBAQEBAQQBAQEBAQEBAQEWCBCGIIROhG2?= =?us-ascii?q?CVYJahmoMiC6KP4YiiR6CPI0hjFGCORMegREPJYJUK4E6SGMBAYUzKliBLAEBA?= =?us-ascii?q?Q?= X-IPAS-Result: =?us-ascii?q?A0AABAA/89FXfeXIaSZdDg8BBQELARkGDIMOAQEBAQF1fAe?= =?us-ascii?q?mXoxThxAmhXYCgVYHOxEBAQEBAQEBAQEBARIBAQkWCUiCMgQDAxWCEQEBAwESE?= =?us-ascii?q?R0BASwMBAsJAgQHAxcdAgIiEgEFAQoSBgESCAoQiA4DDwgDC5QWj0WBMj4yilZ?= =?us-ascii?q?nhEcBAQWESQODIgEBAQEBAQQBAQEBAQEBAQEWCBCGIIROhG2CVYJahmoMiC6KP?= =?us-ascii?q?4YiiR6CPI0hjFGCORMegREPJYJUK4E6SGMBAYUzKliBLAEBAQ?= X-IronPort-AV: E=Sophos;i="5.30,302,1470693600"; d="scan'208,217";a="235780902" Received: from mxout3.mail.janestreet.com ([38.105.200.229]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Sep 2016 01:25:36 +0200 Received: from tot-qpr-mailcore1.delacy.com ([172.27.56.68] helo=tot-qpr-mailcore1) by mxout3.mail.janestreet.com with esmtps (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.82) (envelope-from ) id 1bi8hL-0002Fb-AI for caml-list@inria.fr; Thu, 08 Sep 2016 19:25:35 -0400 X-JS-Flow: external X-JS-Scanner-attachment: (ok) No attachments Received: by tot-qpr-mailcore1 with JS-mailcore (0.1) (envelope-from ) id BX0fNv-AAAAf6-I0; 2016-09-08 19:25:35.284081-04:00 Received: from mail-lf0-f71.google.com ([209.85.215.71]) by mxgoog1.mail.janestreet.com with esmtps (UNKNOWN:AES128-GCM-SHA256:128) (Exim 4.72) (envelope-from ) id 1bi8hL-0000M3-40 for caml-list@inria.fr; Thu, 08 Sep 2016 19:25:35 -0400 Received: by mail-lf0-f71.google.com with SMTP id s64so32656208lfs.1 for ; Thu, 08 Sep 2016 16:25:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=ofY47zwenzCqXOHGop0HAqvsWisnGS99ug0fyXiJFGI=; b=eP1ku9RU5kvLp2MHh8dS8XZpYsN55MPGisp9J+NSxrRaeVB1wohrBVHOdyT5NzMUcB V0YaWLV4s6jYXuKlAh92sdcknlG2768/GMMObmtpaPCVocJoNiNliYCszPX0tmhT9af5 KMQdcFqn9+2DxOixunKFYI2yE3lGgClbv2xYk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=ofY47zwenzCqXOHGop0HAqvsWisnGS99ug0fyXiJFGI=; b=RzhQaaK9yo6w4f6TzIDMrfYkiG/Sz5yzwcwrRivn3V7hMV65NzLjElj0tYZO/H4OKx hB1wR+GOd6HNAjGi7tvkNw4e829HbTAtEPZ9wGY+Gjo/8c0bvaD1t9BNjT2KbNtC6+SP MGREbuDJp/FlD2XGy7IexkZv+F9Q1DWUvpcRRn28nBl2boMlTQPnvyW6bIjvOd9ijX9f 4aTxdf4bjssMWEXtPDPegLheLLX7WohQfaaZFbkQSHUgXqKi2Xe/YR7V80Z0w+QVBq0A +yKnxAvoJbSS0SJ8Nh3PxAgtJaJkg4a9FsXHyjfi92pdj98sBPbl1Uc/nQC7IoNSbAln 1Gjg== X-Gm-Message-State: AE9vXwOrAYPBxE3pMYTxgmUoBnkb1fQ7hoLvl/BmaCNDpOq0z6XfCTwXs7RAdQG2ohPtmg0mJ08KDMfCDTb1fZG0DnW9Ha2r1lln7foMKXCFUh55Go/X38T0qyMeHa+x6bgQzX628z8Ty1AYF/h1 X-Received: by 10.46.71.19 with SMTP id u19mr140440lja.23.1473377133750; Thu, 08 Sep 2016 16:25:33 -0700 (PDT) X-Received: by 10.46.71.19 with SMTP id u19mr140433lja.23.1473377133486; Thu, 08 Sep 2016 16:25:33 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.86.8 with HTTP; Thu, 8 Sep 2016 16:25:12 -0700 (PDT) In-Reply-To: <20160908194545.kzr4bxhmvjwb3iv7@cooper-siegel.org> References: <20160908070526.dmep3cksq3ktt4s4@seneca.home.org> <11961473358836@web2j.yandex.ru> <20160908194545.kzr4bxhmvjwb3iv7@cooper-siegel.org> From:Ben Millwood Date: Fri, 9 Sep 2016 07:25:12 +0800 Message-ID: To:Eric Cooper , caml users Content-Type: multipart/alternative; boundary=001a11410c92a97a33053c0758e2 X-JS-Processed-by: mailcore X-Sender-Copy: hkg-copy Subject: Re: [Caml-list] bindings for xz compression and decompression ? --001a11410c92a97a33053c0758e2 Content-Type: text/plain; charset=UTF-8 async_extended has Async_extended.Std.Reader.with_xzip_file https://ocaml.janestreet.com/ocaml-core/latest/doc/async_extended/Std/Reader.mod/#/with_xzip_file.val Internally it just invokes xzcat, which may or may not satisfy your requirements. There's (as far as I know) no provided way to write xz files. On 9 September 2016 at 03:45, Eric Cooper wrote: > In approx, I just use a Sys.command call to decompress to a temporary > file and then open that. It has these benefits: > * for gzip at least, it's faster than camlzip > * easily detects corrupted files (reading the output stream of a > decompressor doesn't do that until it's too late) > * easy to change compression schemes or support multiple ones based > on file extension, say > > -- > Eric Cooper e c c @ c m u . e d u > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/arc/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > --001a11410c92a97a33053c0758e2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
async_extended has Async_extended.Std.Reader.with_xzip_fil= e


Internally it just invokes xzc= at, which may or may not satisfy your requirements. There's (as far as = I know) no provided way to write xz files.

On 9 September 2016 at 03:45, Eric Coo= per <= ecc@cmu.edu> wrote:
In appr= ox, I just use a Sys.command call to decompress to a temporary
file and then open that.=C2=A0 It has these benefits:
=C2=A0 * for gzip at least, it's faster than camlzip
=C2=A0 * easily detects corrupted files (reading the output stream of a
=C2=A0 =C2=A0 decompressor doesn't do that until it's too late)
=C2=A0 * easy to change compression schemes or support multiple ones based<= br> =C2=A0 =C2=A0 on file extension, say

--
Eric Cooper=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0e c c @ c m u . = e d u

--
Caml-list mailing list.=C2=A0 Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

--001a11410c92a97a33053c0758e2--