Ulysses

General => Off-Topic => Topic started by: Megiddo on May 16, 2008, 07:22:23 PM

Title: HOWTO: Recursively bzip2 files (useful for sv_downloadurl)
Post by: Megiddo on May 16, 2008, 07:22:23 PM
This is stolen from http://www.tcmagazine.com/forums/index.php?s=d5603c1a5248c973313cd7860756fc6d&showtopic=2490&pid=13774&st=0&#entry13774 (http://www.tcmagazine.com/forums/index.php?s=d5603c1a5248c973313cd7860756fc6d&showtopic=2490&pid=13774&st=0&#entry13774). Wanted to put it here because I usually search for this every time I reinstall Windows.

Bzip
Description: Bzip gives you the possibility to compress the files you put on your fileserver (where sv_downloadurl is linked to). This compresses the files to about 40% of its original files size. Due to this it makes it possible to have really fast downloads of other content the client needs to play on your server. And if you wondered about: Source only understands bzip and no other zip program!
Setup:

   1. get bzip for windows (free) http://www.bzip.org/downloads.html
   2. get delspec (free) http://www.bestdiskrecovery.com/delspecial/
   3. unzip both and place the exe's in the %systemroot%\system32 Dir of your server (or any other Dir as long as it's in your path)
   4. create text file and call it bzip2rightclick.reg and put the following in it:


Code: [Select]
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\Bzip2]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\Bzip2\command]
@="delspec %1 -F*.* -M -E\"bzip2 -9 -k\" -B"

  5. Double click bzip2rightclick.reg and accept.

  6. Now right click on any folder you want recursively bzip'd and hit bzip2.
Title: Re: HOWTO: Recursively bzip2 files (useful for sv_downloadurl)
Post by: WildWill on May 17, 2008, 07:53:50 AM
Another good program for bzipping is 7zip.  The nice thing about using 7zip is that it's good for doing the normal zipping etc as well.
Title: Re: HOWTO: Recursively bzip2 files (useful for sv_downloadurl)
Post by: Megiddo on May 17, 2008, 08:06:48 AM
Another good program for bzipping is 7zip.  The nice thing about using 7zip is that it's good for doing the normal zipping etc as well.

7zip doesn't seem to bzip in a form that srcds can understand. When I tried a year or so back it ignored whatever I made with 7zip.
Title: Re: HOWTO: Recursively bzip2 files (useful for sv_downloadurl)
Post by: jay209015 on May 17, 2008, 09:04:55 AM
Quote
7zip doesn't seem to bzip in a form that srcds can understand. When I tried a year or so back it ignored whatever I made with 7zip.
Same for me.
Title: Re: HOWTO: Recursively bzip2 files (useful for sv_downloadurl)
Post by: Rooftops on August 30, 2010, 06:43:38 PM
(Sorry to bump but)

Simple question, can this registry command be edited to include files as well? If so, I would like :D.

Also, something odd's going on with it. If I try to do it, it says:
Quote
The version of this file is not compatible with the version of Windows you're running. Check your computer's system information to see wether you need a x86 (32-bit) or x64 (64-bit) version of the program, and then contact the software publisher.
Funnily enough, I can drag/drop files onto the .exe and it'll compress them. I have a 64 bit OS, win 7. Hm :?
Title: Re: HOWTO: Recursively bzip2 files (useful for sv_downloadurl)
Post by: Megiddo on August 30, 2010, 06:50:16 PM
Might be worth trying to compile the app specifically for your platform.
Title: Re: HOWTO: Recursively bzip2 files (useful for sv_downloadurl)
Post by: MrPresident on August 31, 2010, 09:33:47 PM
7zip works. I just used it to bzip files for my server's fastdl today.