emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: big file warning if compressed


From: Kevin Rodgers
Subject: Re: big file warning if compressed
Date: Tue, 05 Dec 2006 10:30:14 -0700
User-agent: Thunderbird 1.5.0.8 (Windows/20061025)

Richard Stallman wrote:
    > That is because Emacs has no way of telling how big it is
    > until after uncompressing it.

    That's not really true: GNU zip has the --list option, which generates
    output like:

    compressed  uncompr. ratio uncompressed_name
      12574759  58689536  78.5% foo.txt

1. How long does that take?  Does it get the info instantly
or does it have to effectively uncompress the data to get the info?

gzip --list is fast: On that file, it took 15.9 seconds real time (3.0
user, 9.2 system) to run 1,000 iterations, compared to 7.1 seconds real
(6.3 user, 1.0 sys) for 1 iteration of gunzip --stdout | wc -l.

2. What about other compression formats?

According to http://www.gnu.org/software/gzip/manual/html_node/gzip_4.html

        The uncompressed size is given as `-1' for files not in gzip
        format, such as compressed `.Z' files

As far as the other compression programs supported by jka-compr.el,
neither compress/uncompress nor bzip2/bunzip2 seem to have this
feature.

You can try working on this, but I'd rather save it for after the
release.

OK.  (I've already got an untested patch to add support for it.)

--
Kevin





reply via email to

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