File: jka-compr.el.html
This package implements low-level support for reading, writing, and loading compressed files. It hooks into the low-level file I/O functions (including write-region and insert-file-contents) so that they automatically compress or uncompress a file if the file appears to need it (based on the extension of the file name). Packages like Rmail, VM, GNUS, and Info should be able to work with compressed files without modification.
INSTRUCTIONS:
To use jka-compr, invoke the command auto-compression-mode(var)/auto-compression-mode(fun) (which
see), or customize the variable of the same name. Its operation
should be transparent to the user (except for messages appearing when
a file is being compressed or uncompressed).
The variable, jka-compr-compression-info-list can be used to customize jka-compr to work with other compression programs. The default value of this variable allows jka-compr to work with Unix compress and gzip.
If you don't want messages about compressing and decompressing to show up in the echo area, you can set the compress-msg and decompress-msg fields of the jka-compr-compression-info-list to nil.
APPLICATION NOTES:
crypt++
jka-compr can coexist with crypt++ if you take all the decompression
entries out of the crypt-encoding-list. Clearly problems will arise if
you have two programs trying to compress/decompress files. jka-compr
will not "work with" crypt++ in the following sense: you won't be able to
decode encrypted compressed files--that is, files that have been
compressed then encrypted (in that order). Theoretically, crypt++ and
jka-compr could properly handle a file that has been encrypted then
compressed, but there is little point in trying to compress an encrypted
file.
ACKNOWLEDGMENTS
jka-compr is a V19 adaptation of jka-compr for V18 of Emacs. Many people have made helpful suggestions, reported bugs, and even fixed bugs in jka-compr. I recall the following people as being particularly helpful.
Jean-loup Gailly
David Hughes
Richard Pieri
Daniel Quinlan
Chris P. Ross
Rick Sladkey
Andy Norman's ange-ftp was the inspiration for the original jka-compr for Version 18 of Emacs.
After I had made progress on the original jka-compr for V18, I learned of a package written by Kazushi Jam Marukawa, called jam-zcat, that did exactly what I was trying to do. I looked over the jam-zcat source code and probably got some ideas from it.
Defined variables (5)
jka-compr-dd-program | How to invoke ‘dd’. |
jka-compr-inhibit | Non-nil means inhibit automatic uncompression temporarily. |
jka-compr-really-do-compress | Non-nil in a buffer whose visited file was uncompressed on visiting it. |
jka-compr-shell | Shell to be used for calling compression programs. |
jka-compr-temp-name-template | Prefix added to all temp files created by jka-compr. |
Defined functions (12)
jka-compr-byte-compiler-base-file-name | (FILE) |
jka-compr-call-process | (PROG MESSAGE INFILE OUTPUT TEMP ARGS) |
jka-compr-error | (PROG ARGS INFILE MESSAGE &optional ERRFILE) |
jka-compr-file-local-copy | (FILE) |
jka-compr-handler | (OPERATION &rest ARGS) |
jka-compr-insert-file-contents | (FILE &optional VISIT BEG END REPLACE) |
jka-compr-load | (FILE &optional NOERROR NOMESSAGE NOSUFFIX MUST-SUFFIX) |
jka-compr-make-temp-name | (&optional LOCAL-COPY) |
jka-compr-partial-uncompress | (PROG MESSAGE ARGS INFILE BEG LEN) |
jka-compr-run-real-handler | (OPERATION ARGS) |
jka-compr-uninstall | () |
jka-compr-write-region | (START END FILE &optional APPEND VISIT LOCKNAME MUSTBENEW) |