httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From TOKI...@aol.com
Subject Re: A solution to the Win32 console problem
Date Sun, 18 Jun 2000 04:58:30 GMT

In a message dated 00-06-18 03:57:39 EDT, Greg Stein writes...

> Have no fear. There is already a bit of code in ViewCVS to gzip content, 
> but it is not enabled at this point. (I need to find the path to the gzip 
> binary first, and then to figure out the best/right way to pipe the output 
> through gzip as I return it)
> > 
> > It's in /bin... where else would it be?
>  
>  /usr/bin/gzip

It's in /bin on my Linux... thought that sort of thing
was standardized by now. Oh well... now that you
know where it is let's ROCK and ROLL!....
 
> > Heck, just use your PID or TID and pipe out to a unique scratch file
> > and then tell /bin/gzip to compress and pipe to stdout and then
> > have the CGI unlink() the scratch file before it bails out. At 110k of 
> > HTML per page you could do that MANY times in the time it takes 
> > to transmit it only once uncompressed.
>  
>  Nah. I can do some tricks to set up a pipe and avoid temp files.

Even better... but if you do the temps in a RAM disk it's just as fast
as any pipe ( since that's all a pipe really is anyway... in-memory
stream IO ) but to each his own.

>  Even better, ViewCVS can use zlib to do the compression in-process.
>  (assuming that zlib is available on the platform and the Python module is
>  available; if not, backing off to gzip is possible)
>  
>  IOW, it isn't a "quick" solution to do it right. Of course, doing it wrong
>  would be a tremendous help to many people, such as yourself :-)

Not too many ways to 'do it wrong'... it's not rocket science.
Check the inbound user-agent, decide to compress, tweak the
outbound headers... and then lock, load, shoot.

Where can I download the code? 

I can probably do it for you in a few hours. I have a HIGHLY 
OPTIMIZED version of ZLIB that can be linked with just about 
anything and is specifically designed for this sort of thing. The 
original ZLIB is not and has some problems in this area since it 
was not really coded to be used with this particular real-time 
application in mind. It 'bogs down' in a lot of places and in its
original form is a real memory hog.

I've added this sort of real-time compression to hundreds of
programs at this point ( UNIX and Win32 ) and I have OS 'kits' that 
make it pretty much plug-and-play.

Tell me where to download your source code and I'll add real-time
compression ASAP...

I'm assuming it's part of ASF since Apache is obviously
using it, right? If you say it's 'not free to download' that's
going to blow my mind quite a bit given all the discussions
about Apache only using 'free' stuff.

If it's a case where the original thing you based it on that
William Rowe mentioned is free but yours isn't then where
do I get the 'orginal thing'  and/or how do I license your re-work
of it?

Yours...
Kevin Kiley
CTO, Remote Communications, Inc.
http://www.RemoteCommunications.com
http://www.rctp.com - Online Internet Content Compression Server

Mime
View raw message