emacs-devel
[Top][All Lists]
Advanced

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

Re: More (de)compress?


From: Paul Eggert
Subject: Re: More (de)compress?
Date: Mon, 19 Aug 2013 09:41:49 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130803 Thunderbird/17.0.8

Thanks for taking this on.  Some comments on the patch,
in addition to Eli's:

* It can be faster to compress using an external program,
  since the compression can be done in parallel.  Have you
  timed your compression approach on a multicore platform,
  and compared its real time to doing it with external
  compression?  (Similarly for decompression, though I
  expect there we won't find the external program faster.)
  You might try "pigz" for compression, since it's multicore
  internally.

* There seems to be quite a bit of repetition in configure.ac
  and in the C code -- each compression package does pretty
  much the same thing with respect to allocating buffers,
  saving point, etc.  Could this be factored out to simplify
  the code and make it easier to add future compression
  algorithms?

* bzlib_detect and lzm_detect mishandle the case where the
  buffer gap is located very near the start of the buffer.

* If the buffer contains random garbage,
  (decompress-region nil 1 100000)
  signals "Unsupported decompression method", which
  isn't very clear.  It should signal something like
  "Unknown compression format".

* The functions compress-region and decompress-region
  should be defined on all platforms, even those that
  lack all compression libraries.  They'll simply return
  nil on such platforms, since they can't compress or
  decompress anything.  This simplifies the C code and
  will simplify Lisp code too.




reply via email to

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