Bzip2 Compression on the fly ! (fastdownload/sv_downloadurl)
1 Attachment(s)
http://www.ice-gfx.com/pics/sourcemod/bzip2onthefly.png
I always found it annoying, having to compress files everytime I upload a new map/texture/sound to my server manually. That's why I started thinking about if it would be possible to compress files on the fly while the client is downloading it. And yes, it's possible :wink: I've spent some hours writing a PHP script and filed it out allot. Requirements:
Put this line into your cfg/server.cfg file. Enjoy :wink: Note: Doesn't work for TF2 (and other orangebox games ?) atm. |
Re: Bzip2 Compression on the fly !
Whoa!
|
Re: Bzip2 Compression on the fly !
looks awesome :D
|
Re: Bzip2 Compression on the fly !
Why does it have to be running on the same machine as the gameserver? Wouldn't that kind've negate the whole purpose of fastdl?
|
Re: Bzip2 Compression on the fly !
Quote:
What's the purpose of fastdownload for you ? Well a webserver can give you faster download rates than the gameserver. Well, if you have your gameserver running on a 3 Mbit Box, I wouldn't recommend you to use this. The webserver just needs access to the files of the gameserver over the local filesystem, but if both servers are in the same network and you can mount the server over the local network it should also work, never tried that tho. |
Re: Bzip2 Compression on the fly !
Updated
|
Re: Bzip2 Compression on the fly ! (fastdownload/sv_downloadurl)
1 Attachment(s)
I tested today on TF2 server.
TF2 client can't open bz2. (winrar opens normal) define("BUFFER_SIZE", 4096); Attach maps downloaded on my server |
Re: Bzip2 Compression on the fly ! (fastdownload/sv_downloadurl)
I need more details how you configured your server, can I message you somewhere ?
TF2 should be able to open bz2 compressed maps like Hl2dm too. |
Re: Bzip2 Compression on the fly ! (fastdownload/sv_downloadurl)
I'm not able to get this working for TF2 atm.
Orangebox seems to use a different bzip2 compression, unable to decompress the generated files. |
Re: Bzip2 Compression on the fly ! (fastdownload/sv_downloadurl)
I just compress everything into bzip with 7zip since I use a external webserver lol.
|
Re: Bzip2 Compression on the fly ! (fastdownload/sv_downloadurl)
Remove all the ending ?> tags, and I'm betting it will work.
|
Re: Bzip2 Compression on the fly ! (fastdownload/sv_downloadurl)
Quote:
|
Re: Bzip2 Compression on the fly ! (fastdownload/sv_downloadurl)
Quote:
|
Re: Bzip2 Compression on the fly ! (fastdownload/sv_downloadurl)
Isn't it because at the end of the tag whitespace is inserted and that causes problems with headers and such?
|
Re: Bzip2 Compression on the fly ! (fastdownload/sv_downloadurl)
I can't get this working..
Everytime I get a "Wrong Request". Could you please help me? Thank you in advance. |
Re: Bzip2 Compression on the fly ! (fastdownload/sv_downloadurl)
Why would you want to upload the full map to your website if you could just upload the bzip which is usually half the size :/ Some people have really bad upload speeds, even cable limits you to 300 or so kb/s.
|
Re: Bzip2 Compression on the fly ! (fastdownload/sv_downloadurl)
Quote:
I'm not supporting this bzip2 tool I made anymore, because I believe it's not working how it should. When compressing parts of a file on the fly, the HL2 client somehow doesn't like it. |
Re: Bzip2 Compression on the fly ! (fastdownload/sv_downloadurl)
You don't need to upload it twice, just make a copy of it, bzip2, and make your webserver point at .bz2 files only, skipping .bsp files.
The best if I understood your case would be to create a folder compressedmaps/ where you'll copy and compress all maps you upload to your gameserver and then make your webserver point to this folder. so http://www.mywebserversformaps.com/cstrike/maps/ would point to yourgameserver/compressedmaps/ You could even make a script that checks every 5 - 10 seconds if a new .bsp file has been uploaded/created in the maps directory to auto-copy it and then auto-bzip2 it in the compressedmaps folder, and set the good chmod wich would make it downloadable from http://www.mywebserversformaps.com/cstrike/maps/ in a few sec with only 1 upload. |
| All times are GMT -4. The time now is 18:20. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.