The Largest Global Force of ROM Hackers on the Planet!
Home
Help
Login
Register
News: 11 March 2016 -
Forum Rules
Romhacking.net
Romhacking
Programming
zlib inflate/deflate and hex vales
« previous
next »
Print
Pages: [
1
]
Author
Topic: zlib inflate/deflate and hex vales (Read 6566 times)
mudd zero
Jr. Member
Posts: 6
zlib inflate/deflate and hex vales
«
on:
November 18, 2012, 01:27:56 pm »
Dropped project. Since I can read Japanese I have no need to share Sol Trigger, Final Promise Story or Criminal Girls with anybody.
«
Last Edit: January 23, 2013, 06:16:19 pm by mudd zero
»
Logged
LostTemplar
Hero Member
Posts: 910
Re: zlib inflate/deflate and hex vales
«
Reply #1 on:
November 18, 2012, 03:53:24 pm »
http://pastebin.com/WvGxg5Sd
C# with DotNetZipLib. Should be almost the same for all libraries that support zlib, though (if you prefer anything other than C#). I tested it on some of the text files of game you're probably referring to and I can read them just fine after decompression.
Logged
mudd zero
Jr. Member
Posts: 6
Re: zlib inflate/deflate and hex vales
«
Reply #2 on:
November 19, 2012, 01:53:45 am »
.
«
Last Edit: January 23, 2013, 06:16:40 pm by mudd zero
»
Logged
mudd zero
Jr. Member
Posts: 6
Re: zlib inflate/deflate and hex vales
«
Reply #3 on:
November 28, 2012, 03:22:00 am »
.
«
Last Edit: January 23, 2013, 06:17:07 pm by mudd zero
»
Logged
Gemini
Hero Member
Posts: 2030
時を越えよう、そして彼女の元に戻ろう
Re: zlib inflate/deflate and hex vales
«
Reply #4 on:
November 28, 2012, 05:55:35 am »
If you're still using all C++ code, try this implementation instead:
http://code.google.com/p/ff7i/source/browse/trunk/Source/common/gzip.cpp
http://code.google.com/p/ff7i/source/browse/trunk/Source/common/gzip.h
You're gonna have to use zlib and MemStream (it's there in the same SVN folder) in order to make it work, but it's just a few sources to include in your program. You can also fix the gzip header to follow this custom signature format by changing the header structure associated (gzip.h, line 23) and the GZIP_MAGIC constant. When you're done call GzipDecode and GzipEncode to compress and decompress your data to a memory buffer.
Logged
I am the lord, you all know my name, now. I got it all: cash, money, and fame.
mudd zero
Jr. Member
Posts: 6
Re: zlib inflate/deflate and hex vales
«
Reply #5 on:
December 01, 2012, 01:48:30 pm »
.
«
Last Edit: January 23, 2013, 06:17:18 pm by mudd zero
»
Logged
LostTemplar
Hero Member
Posts: 910
Re: zlib inflate/deflate and hex vales
«
Reply #6 on:
December 01, 2012, 05:39:16 pm »
You could for example use
System.IO.Directory.GetFiles
with the filter set to *.tpk; store the filename somewhere, inflate the file and store it under the same name with the extension replaced by .bin. With GetDirectories you can recursively process all sub-directories. Really shouldn't be that difficult. Here's an
example
.
Logged
mudd zero
Jr. Member
Posts: 6
Re: zlib inflate/deflate and hex vales
«
Reply #7 on:
January 21, 2013, 12:06:42 am »
.
«
Last Edit: January 23, 2013, 06:17:36 pm by mudd zero
»
Logged
henke37
Hero Member
Posts: 643
Re: zlib inflate/deflate and hex vales
«
Reply #8 on:
March 30, 2013, 08:19:05 am »
How nice of you to delete all useful content because you think that you are the only one who should ever hear about how the games work.</sarcasm>
Logged
Print
Pages: [
1
]
« previous
next »
Romhacking.net
Romhacking
Programming
zlib inflate/deflate and hex vales