Support for lzop like for gzip?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Support for lzop like for gzip?

Sven Hartrumpf
Hello.

lzop is a compression program with gzip-like command line options.
How can I add to vim automatic decompression and recompression like
it works for gzip and bzip2?

(gzip compresses a little better than lzop,
but lzop is typically much faster, see http://www.lzop.org/ for details.)

Greetings
Sven

attachment0 (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Support for lzop like for gzip?

Tim Chase-2
> lzop is a compression program with gzip-like command line
> options. How can I add to vim automatic decompression and
> recompression like it works for gzip and bzip2?

See the help on "gzip-example" for the basic shell of how to do
it, and you should be able to replace instances of gzip with
calls to lzop.  You may have to twiddle to get the expected
behaviors with lzop vs. gzip, as I'm not sure whether they use
stdin/stdout or if they decompress to a file.

Hope this helps,

-tim







Reply | Threaded
Open this post in threaded view
|

Re: Support for lzop like for gzip?

François Pinard
In reply to this post by Sven Hartrumpf
[[hidden email]]

> (gzip compresses a little better than lzop, but lzop is typically much
> faster, see http://www.lzop.org/ for details.)

I do not know `lzop', but `gzip' may be adjusted for compression or speed.

   -# --fast --best
          Regulate  the  speed of compression using the specified digit #,
          where -1 or --fast  indicates  the  fastest  compression  method
          (less  compression)  and -9 or --best indicates the slowest com?
          pression method (best  compression).   The  default  compression
          level is -6 (that is, biased towards high compression at expense
          of speed).

Moreover, you may set something like:

   export GZIP=-3

once and for all in your .profile or .bash_login, if you want to favour
speed over compression at compression time.  (This has no effect on
decompression, of course.)

So maybe, I do not know, `gzip' compression level could be tuned so it
becomes comparable with `lzop'?  Also worth noting, there are a few
well-documented algorithms which compress better than `gzip' at same
speed, or at better speed at same compression, but they are patented,
and this is why `gzip' avoided their use.

--
Fran�ois Pinard   http://pinard.progiciels-bpi.ca