Author Topic: SceneFile Compression  (Read 1982 times)

Kashmir

  • *
  • Posts: 93
    • View Profile
SceneFile Compression
« on: 2006-09-28 04:13:30 »
Hey,

Ive got my program extracting & de-compressing all parts of the scenefile ok, and all the data in in those files are ok and in the right spots... but when i try to recompress any of those files, without anychanges made to them, they come out about 300bytes bigger than the originals.

Does anybody know what causes this, is there some trick to successfully compress the files?

The Skillster

  • *
  • Posts: 2284
  • Loving every Final Fantasy
    • View Profile
Re: SceneFile Compression
« Reply #1 on: 2006-09-28 06:41:03 »
I think -GoneAway- had a similar problem when he made his editor - hense it never got far.
There is a couple of extractors and compressors around, best bet is to approach the authors for those programs.

Kashmir

  • *
  • Posts: 93
    • View Profile
Re: SceneFile Compression
« Reply #2 on: 2006-09-28 07:22:17 »
Hmmm, doesnt sound good.

with the current level of compression it will need 48 sections instead of 33, so just a standard scenefile will take up 393,216bytes.
(I dont think that will work in game, but im going to try it anyway till i get something better)

Im just using the GZipStream compression & Decompression methods provided with .net, maybe i should be using different ones.

*edit*
tried in game, just caused crashes.
« Last Edit: 2006-09-28 07:45:54 by Kashmir »

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
Re: SceneFile Compression
« Reply #3 on: 2006-09-28 08:50:55 »
Use Zlib

http://www.zlib.net/

It's most likely what the original developers used.

Keep in mind, there are a few ways to compress the files. Take a look at the original files and see what algo was used. I think there are 5 levels of compression (don't quote me)
« Last Edit: 2006-09-28 08:52:45 by halkun »