Go Back   FileForums > Game Backup > PC Games > PC Games - CD/DVD Conversions > Conversion Tutorials

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 17-05-2016, 00:35
RamiroCruzo's Avatar
RamiroCruzo RamiroCruzo is offline
Registered User
 
Join Date: Jul 2015
Location: India
Posts: 184
Thanks: 386
Thanked 171 Times in 75 Posts
RamiroCruzo is on a distinguished road
Arrow

I don't get all the hocus-pocus around the Zlib term...So, here's some database about Zlib, Reflate, Brute, Precomp & pZlib.

@ChronoCross You should read this as there are no Bad-Zlib Stream or Invalid Streams.

Originally, data is stored in streams called Deflate Stream. Those streams are also called Headerless Zlib stream. Once, you wrap these Deflate streams into Headers, they become Zlib stream or Gzip Stream.

Zlib Stream contains Header + CRC + Data. (Header + CRC) = 15 position upto the stream. So Deflate stream = ZlibStream -15.

Now, why Deflate Streams are difficult to search for: As the header contains so called Magic Bytes which help to identify them, but when you seek for Deflate streams, its a bit more Brute & Slow...

Magic Bytes:
Code:
Common:

78 01, 78 5e, 78 9c, 78 da

Rare:

08 1d, 08 5b, 08 99, 08 d7, 18 19, 18 57, 18 95, 18 d3,
28 15, 28 53, 28 91, 28 cf, 38 11, 38 4f, 38 8d, 38 cb,
48 0d, 48 4b, 48 89, 48 c7, 58 09, 58 47, 58 85, 58 c3,
68 05, 68 43, 68 81, 68 de

Very rare:

08 3c, 08 7a, 08 b8, 08 f6, 18 38, 18 76, 18 b4, 18 f2,
28 34, 28 72, 28 b0, 28 ee, 38 30, 38 6e, 38 ac, 38 ea,
48 2c, 48 6a, 48 a8, 48 e6, 58 28, 58 66, 58 a4, 58 e2,
68 24, 68 62, 68 bf, 68 fd, 78 3f, 78 7d, 78 bb, 78 f9
Now comes how Reflate works...
Rawdet reads all the offsets of the file & initiates Inflate from each of them. [Inflate = Decompression of Zlib Stream]. It usually gets error where the stream isn't present & where ever it successfully inflates, it creates buffer out of the data. Thats what .raw are, unprocessed Deflate streams. Raw2hif firstly Inflates the stream & then Deflates (Compresses) the streams with the level you have provided e.g. -c9 compresses the stream in Level9, thats why the higher the level, the smaller is the output.

Brute on the other hand, instead of creating buffers, it directly inflates them and creates the output.

Now, comes the Precomp part...Its a storehouse of processes. You can assume its slowness is due to it hit & trial method. It again & again reads the file to discover more & more stream & even to find info about stream it takes about 9 * 9 trials. Thats why its disk reading values are high e.g. for Brute of 1 GB file it approx. reads 98 GB data.

pZlib, it scans for the Magic Bytes & Inflates the streams, easy-peasy... Not in coding....
__________________
We are such stuff as dreams are made on, and our little life is rounded with a sleep.
Reply With Quote
The Following 3 Users Say Thank You to RamiroCruzo For This Useful Post:
felice2011 (17-05-2016), Razor12911 (17-05-2016), Simorq (17-05-2016)
Sponsored Links
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple Tutorial of Compressing GTAV Razor12911 Conversion Tutorials 26 29-01-2019 01:31
Precomp Vs Precomp Test felice2011 Conversion Tutorials 18 28-02-2016 04:10
Precomp 0.44 and NEW packjpg.exe (self optimized) panker1992 Conversion Tutorials 7 14-01-2016 09:23
Information about Precomp Razor12911 Conversion Tutorials 6 02-09-2015 16:10
Commands use in Srep and Precomp red01 PC Games 2 18-06-2013 05:55



All times are GMT -7. The time now is 12:56.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com