I'm using tellg(); to get the file size so that should not be the problem.
It works perfectly for me, this is what i did:
Code:c:\test>dd.exe -d c:\test\DunDefHeroes.dun c:\test\save.decompressed Dungeon Defenders Compression Toolkit by fairchild ======================================================= version 0.1.0 === - Open input file: DunDefHeroes.dun - File size: 0x00019000 (102400) - Reading buffer from file, done. ! Compressed data block found. test - Open output file: save.decompressed1 All done!What's the output from the compress preceedure when you compress the file? Also if you have "gnuwin32" or similar installed, make sure you don't use the (linux)dd program as that is for copying data. In that case try rename my tool "dd.exe" to "dungeons.exe" and run that instead.Code:C:\test>dd -c save.decompressed DunDefHeroes.dun Dungeon Defenders Compression Toolkit by fairchild ======================================================= version 0.1.0 === - Open output file: DunDefHeroes.dun - File size: 0x00019000 (102400) - Reading buffer from file, done. - Open input file: save.decompressed1 - Compressing.. - Fixing checksum. All done!