compression
I want to include a compression algorithm in a game that I am making, however there are hundreds of patents on just about every compression algorithm I know of. (run-length, huffman, gif, etc etc etc).
Does anybody know of a compression algorithm that is freeware so I can include it in my game and not worry about anything.
---
coming...
fakemind.com
http://fakemind.com
The PNG image format uses a compression scheme that is available for anybody to use.
"If a man does not keep pace with his companions, perhaps it is because he hears a different drummer. Let him step to the music he hears, however measured or far away" --Henry David Thoreau
"If a man does not keep pace with his companions, perhaps it is because he hears a different drummer. Let him step to the music he hears, however measured or far away" --Henry David Thoreau
"If a man does not keep pace with his companions, perhaps it is because he hears a different drummer. Let him step to the music he hears, however measured or far away"--Henry David Thoreau
S3TC (also known as DXTC.)
Compressed texture format, fairly good, 1 format requires as little as 4-bits per pixel, the rest are either 6 or 8.
It is a lossy format, but most images don''t seem to suffer.
It''s freely available, anybody can use it, and it is widely supported. It is a native texture format on the following pieces of hardware (there may be one or two slip ups in here):
GeForce & GeForce 2
Voodoo 4/5
ATI Rage 128, 128 Pro, Fury, Radeon (The later 128''s have it, I''m not sure about the earlier ones)
Savage4 and Savage 2000 (maybe original Savage3D)
Compressed texture format, fairly good, 1 format requires as little as 4-bits per pixel, the rest are either 6 or 8.
It is a lossy format, but most images don''t seem to suffer.
It''s freely available, anybody can use it, and it is widely supported. It is a native texture format on the following pieces of hardware (there may be one or two slip ups in here):
GeForce & GeForce 2
Voodoo 4/5
ATI Rage 128, 128 Pro, Fury, Radeon (The later 128''s have it, I''m not sure about the earlier ones)
Savage4 and Savage 2000 (maybe original Savage3D)
If I were you, I would spend some time on creating a file class which reads from a ZIP-file. A library called ZLIB is freely (as far as I know) available and handles the compression algorithm for you. All you have to do is figure out where the compressed data resides in the file, seek to the position, and decompress with a simple loop in your program. www.wotsit.org contains enough documentation on the ZIP-file format to get you going. ZLIB also comes with a good introduction of how the library works.
BTW, ZLIB is also used in the PNG format.
Why ZIP files:
1. the decompression is ''for free'' with ZLIB (i.e. you don''t have to worry about it too much)
2. You can easily take a directory and turn it into a ZIP-File with WinZIP or similar programs. This frees you from having to write your own utilities.
Alternatives:
RAR ... with WinRAR you should also get the UNRAR.DLL and a header file documenting the functions. I think this library is even easier to use (from looking at the interface) than ZLIB , since it takes care of the ''find the correct position in the file'' stuff. But, I dunno how performance compares with the ZIP format, since RAR is a solid archiver. It might have to decompress some files which come before the file you actually want in order to be able to decompress that one.
ACE ... similar to RAR in usage
BZ ... similar to ZLIB in usage
I don''t think Huffman-coding is copyrighted/patented, but arithmetic coding and LZW (GIF) is.
Whew, this got longer than I wanted,
MK42
BTW, ZLIB is also used in the PNG format.
Why ZIP files:
1. the decompression is ''for free'' with ZLIB (i.e. you don''t have to worry about it too much)
2. You can easily take a directory and turn it into a ZIP-File with WinZIP or similar programs. This frees you from having to write your own utilities.
Alternatives:
RAR ... with WinRAR you should also get the UNRAR.DLL and a header file documenting the functions. I think this library is even easier to use (from looking at the interface) than ZLIB , since it takes care of the ''find the correct position in the file'' stuff. But, I dunno how performance compares with the ZIP format, since RAR is a solid archiver. It might have to decompress some files which come before the file you actually want in order to be able to decompress that one.
ACE ... similar to RAR in usage
BZ ... similar to ZLIB in usage
I don''t think Huffman-coding is copyrighted/patented, but arithmetic coding and LZW (GIF) is.
Whew, this got longer than I wanted,
MK42
Compress your pictures as Jpegs. It''s a free format and here you can get a free library that loads jpegs. It''s very easy to use:
http://developer.intel.com/vtune/perflibst/ijl/
ZIP reading isn''t probably patented, as Quake 3 packs it''s .PAK-files with ZIP.
Download Titan engine source and rip the ZIP-reader from it:
http://talika.fie.us.es/~titan/
Should be easy, haven''t tried though.
-Hans [home page] [e-mail]
http://developer.intel.com/vtune/perflibst/ijl/
ZIP reading isn''t probably patented, as Quake 3 packs it''s .PAK-files with ZIP.
Download Titan engine source and rip the ZIP-reader from it:
http://talika.fie.us.es/~titan/
Should be easy, haven''t tried though.
-Hans [home page] [e-mail]
I was going to suggest jpg too - its lossy though, not want want if you're looking for lossless compression
And while it is true the the gif format is patented - it is patented by two different companies and largely unprotected as far as I know. And old, its patent may have expired. (they only get 20 years) If its not expired yet, it will be soon (2003 my guess)! but gif's dont compress much.
if you need/want non-content compression use zip.
Edited by - Magmai Kai Holmlor on October 14, 2000 1:24:06 PM
And while it is true the the gif format is patented - it is patented by two different companies and largely unprotected as far as I know. And old, its patent may have expired. (they only get 20 years) If its not expired yet, it will be soon (2003 my guess)! but gif's dont compress much.
if you need/want non-content compression use zip.
Edited by - Magmai Kai Holmlor on October 14, 2000 1:24:06 PM
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
Hi!
Me again ... I''ve been looking at the other posts and wondering whether I missed something ... why is almost everybody suggesting image formats? Because, Jeremiah mentioned GIF in his post?
Anyways, if you''re after image formats, use PNG for losless compression and JPG (or maybe J2K) for lossy compression
MK42
Me again ... I''ve been looking at the other posts and wondering whether I missed something ... why is almost everybody suggesting image formats? Because, Jeremiah mentioned GIF in his post?
Anyways, if you''re after image formats, use PNG for losless compression and JPG (or maybe J2K) for lossy compression
MK42
I would imagine that (at least most of the time) the implementation of a compression algorithm would be patented, not the compression format itself, so you could use pretty much whatever format you want just so long as you write your own functions for it.
Go ahead! Make one yourself! It''s fun, and chicks dig it!
Someone correct me if I''m wrong about any of this.
(Got a feeling someones going to mention GIF or MP3.)
IO_FissionSig();
Go ahead! Make one yourself! It''s fun, and chicks dig it!
Someone correct me if I''m wrong about any of this.
(Got a feeling someones going to mention GIF or MP3.)
IO_FissionSig();
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement