Re: estimate zlib compression ratio?




<tim.weiler@xxxxxxxxx> skrev i en meddelelse
news:1177427280.359990.242480@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Is there a fast way to estimate the zlib compression ratio for a file
(or any stream) without actually doing the compression?

For example, I need to send files over a socket, and some files are
jpegs, which don't compress that well, but other files are large text
documents with good compression ratios. I'd like to selectively
compress the files based on an estimated compression ratio.

A funny idea - you could compress a small part of the the file with QuickLZ
first (so fast that it has negligible CPU usage) and multiply that
compression ratio by some constant to estimate that of zlib.

Lasse Reinhold


.



Relevant Pages

  • Re: Gasoline grade BTUs per gallon?
    ... They have much higher compression ratios than gasoline ... built to use say, 87 octane gasoline, you will see no "preformance ... Higher compression ratio engines can make better use of it. ... If my engine requires higher octane fuel, ...
    (sci.energy)
  • Re: Why Cant A Fuel injected Petrol Engine be as Efficient as a Diesel?
    ... >compression ratios. ... This limits the compression ratio. ... diesel engines compress air only and add the fuel after that. ...
    (sci.energy)
  • Re: [fitsbits] Rice compression from the command line
    ... but beats gzip and bzip2 handsomely in compression ratio. ... Which raises the general question of constructing a figure of merit for data compression. ... Discussions like this usually focus on compression ratio, the speed to compress and the speed to decompress, but there are a number of important, less quantifiable, parameters: ... The FITS tile compression convention is one step toward greasing the rails. ...
    (sci.astro.fits)
  • =?ISO-8859-1?Q?TNT2_b=EAta?=
    ... Since developing compression software, ... In order to answer these questions, i decided to have a look at TNT ... the new "highest compression ratio" Saturn-based ...
    (comp.sys.hp48)
  • Re: Compression filter for Loopback device
    ... The idea i had was to mount a swap partition over a compressed block ... > Anyway, my main concern was compression ratio, not performance. ... >> I'm very surprised you got ratios better than CramFS, ...
    (Linux-Kernel)