<code>archive-mode</code> (<code>arc-mode.el</code>) is the Emacs builtin mode for viewing and editing the contents of archive files like <code>.arc</code>, <code>.zip</code>, <code>.lzh</code>, <code>.zoo</code>, etc.  See [[Manual:arc]] for the basics.

Note that <code>.tar</code> files are handled by TarMode, which is slightly different.

Note that [[TrampMode]] can also access archives via gvfs where available (but it looks like nesting e.g. zip in zip isn't possible with tramp).

New archive types can be added to <code>archive-mode</code> without too much trouble.  The builtin modes usually look at the file directly to get the contents, but run an external program to make changes.  Have a look at for instance

* [[http://user42.tuxfamily.org/arc-lzh-exe/index.html arc-lzh-exe.el]] -- adds support for lzh self-extracting executables (viewing only)

But note that in general, arc-mode.el is not supposed to be extensible to support additional types of archives on the user level (s.a. [[https://debbugs.gnu.org/cgi/bugreport.cgi?bug=79574]])

[new]
Note about file extraction to the file system:

* <code>archive-mode</code>  cannot extract a file in an archive *to the file system* (with the timestamp in the archive), only *to a buffer* for viewing (and when you save the buffer to the file system you obviously do not get the correct timestamp from the archive). 

[new:halloleo:2013-07-18 02:00 UTC]
Question to the topic above: Does anybody know of an arc-mode replacement, which enables extraction to the file system?

[new]
Note about archive-mode for emacs within the cygwin environment:
* Diagnostics: Only an empty directory is shown by emacs within cygwin for a non-empty zip-file.
* Cause: The zip file has been stored in a MS-DOS path that was mounted under cygwin in <b>text-mode</b>. The zip-file contains carry return-linefeed sequences that are truncated to linefeed only in the cygwin text file system. This invalidates the offsets in the central directory at the end of the zip-file. Thus the directory entries are not found.
* Fix: Mount the file system in binary mode. See manual page for mount under cygwin.

----
CategoryFiles
