Difference between revisions of "Talk:YAZ0 (File Format)"

From Custom Mario Kart
Jump to navigation Jump to search
(Special use of header offset 8?)
Line 24: Line 24:
 
== Special use of header offset 8 ==
 
== Special use of header offset 8 ==
 
Can anyone explain the special usage of the 8 bytes (last edits). Are they really used as two  4 byte numbers? I don't believe it! And so I'll undo the last changes. -- [[User:Wiimm|Wiimm]] ([[User talk:Wiimm|talk]]) 20:11, 1 July 2018 (UTC)
 
Can anyone explain the special usage of the 8 bytes (last edits). Are they really used as two  4 byte numbers? I don't believe it! And so I'll undo the last changes. -- [[User:Wiimm|Wiimm]] ([[User talk:Wiimm|talk]]) 20:11, 1 July 2018 (UTC)
 +
 +
: Now you're being very selfish, and think you know everything. You have only seen files in MKW, and the article says they are 0 in MKW. The first UInt32 is used in games like BOTW and SMO. Only the first UInt32 is known, the second is always 0. In SMO, the value is always 0x1000, which is the alignment of the data inside SARC file. So the first UInt32 has something to do with the alignment of the file. Probably for the CPU to know how to align the data in memory without decompressing.<br><br>Since you're always talking about everyone is free to edit anything, then you should consider writing on the talk page first, before reverting anything, just because you don't ''think'' it's correct.<br>--[[User:Wexos|Wexos]] ([[User Talk:Wexos|Talk]] | [[Special:Contributions/Wexos|Contribs]])  &ndash;  [[Help:Contents|<span style="color:red;background:black;border-style:double">CT/MK8 Wiki Admin</span>]] 20:58, 1 July 2018 (UTC)

Revision as of 20:58, 1 July 2018

YAZ0

(moved from user talk:Wiimm)

I have decided to add szs suppot to the kmp modifier but the page about the yaz0 compression isn't clear to me, can you give me a more clear explaination so I can code it myself?
kHacker35000vr 11:04, 10 November 2011 (CET)

Do you want only reading szs or also writing? Ask more detailed!
The reading example is short and fast, and in my eyes very clear. Which part can't you understand?
The writing part is more complicated, because you must try different chunks to find a good compression. See my compression source.
Use my source — why invent the wheel again?
Wiimm 16:54, 10 November 2011 (CET)
I wanted both, I didn't know that you shared the functions on a site, I can't understand the part with the chunks. Maybe an example makes it more clear.
My problem is that I use a different language and the ex. on the preview is very short.
kHacker35000vr 17:03, 10 November 2011 (CET)
I know I have nothing to do with this, but I have a friend named "MarioNumber1" who made a Yaz0 Decompression tool in C# (What kind of language is the KMP Modifier?). And you can use another program within a program. To make it easier, you can direct your program to open a Batch file, which will open Wiimm's Yaz0 decomposer. Of course, you can still use the program's source, but it is possible to use the program within a program. I can contact MarioNumber1 and see if he'll allow me to use the source (I already have the source). It's already been reversed & treated as an erray of bytes to work with endian, so it seems to be functional. I've also used some byte converters to get it to work. I will ask him, and send you the source. If you can understand C#, than you can probably re-use that source and make it compress Yaz0. I'll ask him.
SuperMario64DS, 21:58, 10 November 2011 (CET)
Let's start with decompression. I have added some comments to YAZ0#Decompression. I don't now how to be more detailed, because I think description and example are very clear (ok, I'm a programmer). Please ask more concrete.
Wiimm 15:41, 11 November 2011 (CET)
The KMP Modifier is coded in vb.net, If I read this language I can always directly understand what there stands. If I read c# it's a bit harder but I can still understand some parts. I don't need the script for decompression/compression. Maybe if I know all the commands of any compressor I can use it as extra file so I don't have to translate between 2 languages.
I do understand some parts of the YAZ0 compression, but I get stuck when I try to decrompress it myself (so no programs). Altough I'd like it more to understand it completly; if I can use (a part of) your tool as resource I can decompress and compress without more problems.
kHacker35000vr 16:14, 11 November 2011 (CET)
All my programs are .Net of course. The szs modifier's source isn't released but ctools is here: [1]. That may not be clear, but I've implemented it as a System.IO.Stream, so that it can sit transparently on top of a file stream or any other kind of stream and decompress or compress as needed. If you find that too difficult to understand (which is fair enough really), I can upload the relevant szs modifier file (it's inefficient but it does work).
Chadderz 06:50, 13 November 2011 (CET)

Special use of header offset 8

Can anyone explain the special usage of the 8 bytes (last edits). Are they really used as two 4 byte numbers? I don't believe it! And so I'll undo the last changes. -- Wiimm (talk) 20:11, 1 July 2018 (UTC)

Now you're being very selfish, and think you know everything. You have only seen files in MKW, and the article says they are 0 in MKW. The first UInt32 is used in games like BOTW and SMO. Only the first UInt32 is known, the second is always 0. In SMO, the value is always 0x1000, which is the alignment of the data inside SARC file. So the first UInt32 has something to do with the alignment of the file. Probably for the CPU to know how to align the data in memory without decompressing.

Since you're always talking about everyone is free to edit anything, then you should consider writing on the talk page first, before reverting anything, just because you don't think it's correct.
--Wexos (Talk | Contribs) – CT/MK8 Wiki Admin 20:58, 1 July 2018 (UTC)