Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

krakrazor

File Compression

This topic is 5328 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Where can i find a tutorial on file compression? i don''t want no RLE or some other useless method... i would like to be able to compress .wav files atleast 50%

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
quote:
Original post by krakrazor
Where can i find a tutorial on file compression? i don''t want no RLE or some other useless method... i would like to be able to compress .wav files atleast 50%


If you want to use generic file compression to look into huffman encoding, arithmetic compression, or something like LARC (all of the articles section this site has information on). Most of them are fairly simple. However if you want to do audio compression like MP3 or ACC you can quickly find your self dealing with advanced topics like fast fouier transforms and psycho acoustics.

I recommend you look into an already existing open source audio compression system like <a href="www.vorbis.com/">Ogg Vorbis</a> or <a href="http://flac.sourceforge.net/">FLAC</a>, both of which have a Free SDK avaliable.

Share this post


Link to post
Share on other sites
My compression program isn''t gonna be neccesarilly be used for audio... it''s also gonna be used for video/graphics/executables.... but i''m guessing the chunk of it is gonna be audio and graphics so i would rather optimize for that

Share this post


Link to post
Share on other sites
I think the java library provides some functionality for interacting with zip and jar (which use zip compression) files. For general-purpose compression it''s hard to do much better.

But it might be that it just has to pretend that it does because of how the reflection API is implemented. I haven''t tried playing around with it.

Share this post


Link to post
Share on other sites
Why are you asking for only a general purpose compression? Use OGG for audio, some free codec like XVid for video*, JPEG and PNG for images, ZIP or BZ2 for everything else.

*) well, I''m not sure how legal XVid is.

Share this post


Link to post
Share on other sites
I''m gonna make a little consolidated file system, like "pak" or "pk3" files in quake... but i would like to make compression available to the files that want it.

Share this post


Link to post
Share on other sites

The best solution would be to choose the right compressor for the right object (for example JPG for images, MP3 for musics, ZLIB for other data ).
The hard is to write/read everything to/from a single stream.

See also http://www.gzip.org/zlib/

Share this post


Link to post
Share on other sites
I would recommend you look at the paper 'It's still loading?' that
Scott Bilas held at gdc 2000. Here's the link
Clickey

[edited by - weddo on January 12, 2004 5:28:14 PM]

Share this post


Link to post
Share on other sites
Look up 7-Zip. It''s an algorithm that compresses things to zip format, but it does it much more effectively than the regular zip algorithm (about 10% more compression)

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!