From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pierre Neidhardt Subject: Publishing with Lzip Date: Sun, 10 Mar 2019 19:24:27 +0100 Message-ID: <87mum2zixw.fsf@ambrevar.xyz> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:41716) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h337i-0003rx-Oy for guix-devel@gnu.org; Sun, 10 Mar 2019 14:24:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h337g-00064C-Ut for guix-devel@gnu.org; Sun, 10 Mar 2019 14:24:34 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:45529) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h337g-000622-DG for guix-devel@gnu.org; Sun, 10 Mar 2019 14:24:32 -0400 Received: from bababa (lfbn-1-12225-33.w90-92.abo.wanadoo.fr [90.92.41.33]) (Authenticated sender: mail@ambrevar.xyz) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id AD7F2C0004 for ; Sun, 10 Mar 2019 18:24:27 +0000 (UTC) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel --=-=-= Content-Type: text/plain Hi, I've just sent a patch of a first draft for the Lzip bindings: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=34807 Switching from Gzip (Zlib) to Lzip would save up to some 50% disk usage for substitutes which would greatly benefit the servers and help reducing the bandwidth usage. A few things are missing in the patch and I would probably need some help: - The %liblz variable in guix/config.scm.in is not set dynamically by autoconf. This is because lzlib does not have a pkg-config entry. I don't know much about autoconf, so if someone knows how to do this properly... - I'm still a bit confused about how the API is supposed to work. There is a lz-(de)compress-finish function which is supposed to be called according to the examples but the manual does not really says why. If I call it, the tests fail. - I'm also not 100% I'm doing the right thing with the encoder/decoder: should we write everything first, then read as much as we can? Or chain write-read calls like in bbexample.c? - I'm not 100% sure either that the terminating chunk will always be compressed / decompressed. (It works in the test though.) I don't really understand how Lzlib handles that part. - How can I map between C enums and Guile with dynamic FFI? This would be useful to have improve error messages. - lzlib.scm is not used for publishing in the patch. Will do that later. What are the strategies for transitioning from .gz to .lz? I suggest the following: - On publishing, replace .gz with .lz compression. - When extracting, check the type and call the appropriate format decompressor. Feedback welcome! -- Pierre Neidhardt https://ambrevar.xyz/ --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlyFVlsACgkQm9z0l6S7 zH98OQf/cNa0MMhE7j9xhOJI5tpaWMcVQMPKqdM/n8zYkK0LHPIqxVAHs3T+EMHr G+2uwdnQ22ONmUjX/UZRtW90gHt8+8QVGpxIGsavCojIkkTFBW8QvzCnzRa2xA/Z SVOA4pOWZ4pLvDsC6u5wdormV7Ymcsml5V6KRW5yybXl3+myGSi4Qgwqi4G0BFPo wCDeOQU8r5trcRxnPUOw7gOeTTKNChbkjuIwqnIrxW2k5NrgK35Z9XLSg2ea7aaL uQ32q63SUisK0aGwAc1DsCRUGLzre+kQKntb38CiAJUovW0aBcZpKKOzMXTm6t4r e31CaC+owJpSKPlzpwJUOif3pdjv1A== =W976 -----END PGP SIGNATURE----- --=-=-=--