* [PATCH] Adding lz4 support to jka-compr
@ 2016-07-20 10:40 Sven Joachim
0 siblings, 0 replies; only message in thread
From: Sven Joachim @ 2016-07-20 10:40 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 630 bytes --]
Recently I stumbled upon a file with .lz4 extension, wondered what that
was and if Emacs could read it. It turned out out that it has been
compressed with a shiny new very fast compressor, found on
https://cyan4973.github.io/lz4/. Fortunately its commandline syntax is
quite standard, and so it was straightforward to add jka-compr support
for it, see the attached patch (tested on the emacs-25 branch, but
jka-cmpr-hook.el on the master branch is identical).
For those who want to test it and not build lz4 from source: on Debian
and derivatives, the lz4 program can be found in the liblz4-tool package.
Cheers,
Sven
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Support-lz4-compressed-files.patch --]
[-- Type: text/x-diff, Size: 1308 bytes --]
From 32696c696a3faaccf2d2995f4fdd37b3843eee1a Mon Sep 17 00:00:00 2001
From: Sven Joachim <svenjoac@gmx.de>
Date: Wed, 20 Jul 2016 12:07:34 +0200
Subject: [PATCH] Support lz4 compressed files
* lisp/jka-cmpr-hook.el (jka-compr-compression-info-list):
Support .lz4 compressed files.
---
lisp/jka-cmpr-hook.el | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lisp/jka-cmpr-hook.el b/lisp/jka-cmpr-hook.el
index 39302f0..7d6a49a 100644
--- a/lisp/jka-cmpr-hook.el
+++ b/lisp/jka-cmpr-hook.el
@@ -226,6 +226,10 @@ jka-compr-compression-info-list
"Lzip compressing" "lzip" ("-c" "-q")
"Lzip uncompressing" "lzip" ("-c" "-q" "-d")
t t "LZIP"]
+ ["\\.lz4\\'"
+ "Lz4 compressing" "lz4" ("-c" "-q")
+ "Lz4 uncompressing" "lz4" ("-c" "-q" "-d")
+ t t "LZ4"]
["\\.lzma\\'"
"LZMA compressing" "lzma" ("-c" "-q" "-z")
"LZMA uncompressing" "lzma" ("-c" "-q" "-d")
@@ -302,7 +306,7 @@ jka-compr-compression-info-list
(boolean :tag "Strip Extension")
(string :tag "Magic Bytes")))
:set 'jka-compr-set
- :version "24.1" ; removed version extension piece
+ :version "25.2" ; added lz4 support
:group 'jka-compr)
(defcustom jka-compr-mode-alist-additions
--
2.8.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-07-20 10:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-20 10:40 [PATCH] Adding lz4 support to jka-compr Sven Joachim
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.