unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Dmitry Antipov <dmantipov@yandex.ru>
Cc: Emacs development discussions <emacs-devel@gnu.org>
Subject: Re: More (de)compress?
Date: Mon, 19 Aug 2013 09:41:49 -0700	[thread overview]
Message-ID: <52124ACD.20502@cs.ucla.edu> (raw)
In-Reply-To: <52120CEA.6060701@yandex.ru>

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.




  parent reply	other threads:[~2013-08-19 16:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-19 12:17 More (de)compress? Dmitry Antipov
2013-08-19 16:13 ` Eli Zaretskii
2013-08-19 16:28   ` Lars Magne Ingebrigtsen
2013-08-19 16:41 ` Paul Eggert [this message]
2013-08-19 16:57   ` Eli Zaretskii
2013-08-20  8:19   ` Dmitry Antipov
2013-08-20 14:32     ` Stefan Monnier
2013-08-20 14:34     ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52124ACD.20502@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=dmantipov@yandex.ru \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).