Author Topic: HOWTO: Recursively bzip2 files (useful for sv_downloadurl)  (Read 7061 times)

0 Members and 1 Guest are viewing this topic.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6213
  • Karma: 394
  • Project Lead
This is stolen from 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.
« Last Edit: May 16, 2008, 07:39:00 PM by Megiddo »
Experiencing God's grace one day at a time.

Offline WildWill

  • Global Moderator
  • Full Member
  • ****
  • Posts: 100
  • Karma: 15
    • Beast_Building_Server
Re: HOWTO: Recursively bzip2 files (useful for sv_downloadurl)
« Reply #1 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.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6213
  • Karma: 394
  • Project Lead
Re: HOWTO: Recursively bzip2 files (useful for sv_downloadurl)
« Reply #2 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.
Experiencing God's grace one day at a time.

Offline jay209015

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 934
  • Karma: 62
    • Dev-Solutions
Re: HOWTO: Recursively bzip2 files (useful for sv_downloadurl)
« Reply #3 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.
An error only becomes a mistake when you refuse to correct it. --JFK

"And thus the downfall of the great ULX dynasty was wrought not by another dynasty, but the slow and steady deterioration of the leaders themselves, followed by the deprecation of the great knowledge they possessed." -Gmod, Chapter 28, verse 34 -- Stickly

Offline Rooftops

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Re: HOWTO: Recursively bzip2 files (useful for sv_downloadurl)
« Reply #4 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 :?

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6213
  • Karma: 394
  • Project Lead
Re: HOWTO: Recursively bzip2 files (useful for sv_downloadurl)
« Reply #5 on: August 30, 2010, 06:50:16 PM »
Might be worth trying to compile the app specifically for your platform.
Experiencing God's grace one day at a time.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: HOWTO: Recursively bzip2 files (useful for sv_downloadurl)
« Reply #6 on: August 31, 2010, 09:33:47 PM »
7zip works. I just used it to bzip files for my server's fastdl today.