Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: MyndFyre on October 23, 2008, 12:59 PM

Title: Compression types in MPQ files?
Post by: MyndFyre on October 23, 2008, 12:59 PM
Does anyone know which algorithms are typically used for MPQ compression?  I'm trying to decide on a starting point.

Stormlib - the library I use for MBNCSUtil and BN#'s MPQ support right now - supports bzip2, huffman (which I can only imagine is generic), PKLib, and zlib, as well as a special .WAV compression encoder.  I'd like to port it to .NET, so that I can more reliably have a cross-platform library and substantially reduce my filesize.  I don't want to use #ziplib as a base because it's GPL, which is incompatible with the license to BN# and MBNCSUtil (which is BSD).

I'd assume Blizzard isn't using ALL of these types of compression in their stuff; does anyone know for sure, though?
Title: Re: Compression types in MPQ files?
Post by: Ringo on October 23, 2008, 01:52 PM
iirc, i'm sure I remember reading somwhere, it was bzip.
But when I read this page:
http://www.campaigncreations.org/starcraft/inside_mopaq/chapter2.htm#compression
It say's it's PKWare. (unless, pkware are the authors of bzip)
I'm pretty sure the wav compression is used to decompress wav files after extracting, and compressing wav files user's add to sc maps. (but don't quote me on that one)
Title: Re: Compression types in MPQ files?
Post by: xpeh on January 14, 2009, 03:22 PM
I played with mpq editors.

On maximum multimedia compression level MPQ compressed game sounds better than Winrar on maximum compression level.

How is it possible?
Title: Re: Compression types in MPQ files?
Post by: cokesucker on January 19, 2009, 08:04 PM
possibly its being compressed a hell of a lot more? this is like saying "when i pound my sunglasses with a hammer and stuff them into a thimble then glue them back together again they dont look as good as if i fold them up and put them in my pocket" or should this be a lossy vs lossless discussion?
Title: Re: Compression types in MPQ files?
Post by: bulletproof tiger on January 20, 2009, 01:11 AM
Quote from: cokesucker on January 19, 2009, 08:04 PM
possibly its being compressed a hell of a lot more? this is like saying "when i pound my sunglasses with a hammer and stuff them into a thimble then glue them back together again they dont look as good as if i fold them up and put them in my pocket" or should this be a lossy vs lossless discussion?

gtfo
Title: Re: Compression types in MPQ files?
Post by: MrRaza on January 20, 2009, 11:39 PM
Quote from: cokesucker on January 19, 2009, 08:04 PM
possibly its being compressed a hell of a lot more? this is like saying "when i pound my sunglasses with a hammer and stuff them into a thimble then glue them back together again they dont look as good as if i fold them up and put them in my pocket" or should this be a lossy vs lossless discussion?

classic.