[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Publishing with Lzip

From: Pierre Neidhardt
Subject: Publishing with Lzip
Date: Sun, 10 Mar 2019 19:24:27 +0100
User-agent: mu4e 1.0; emacs 26.1


I've just sent a patch of a first draft for the Lzip bindings:

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/ is not set dynamically by
  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 

Feedback welcome!

Pierre Neidhardt

Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]