View Single Post
  #366  
Old 23-06-2023, 14:26
Masquerade Masquerade is offline
Registered User
 
Join Date: Jan 2020
Location: Monte d'Or
Posts: 1,217
Thanks: 294
Thanked 1,404 Times in 637 Posts
Masquerade is on a distinguished road
[Proof of Concept / Work In Progress] Yakuza SLLZ v1

This is a little project I've been working on in an attempt to implement the SLLZ algorithm found in Yakuza games as an XTool plugin. The code used for compression and decompression was written by Kaplas80. The attempt was to make it into a standalone executable. I wanted to share it here despite being unfinished. Requires .NET Framework v4.8.

There are a few problems with the plugin in its current state. Decompression of sllz streams seems to work completely fine. However, compression is slow and is missing the 2x 4 bytes of header information containing the compressed size and decompressed size (because for some reason Visual Studio insists on this being 8 byte rather than 4 byte arrays). They are filled as 00 bytes instead for the time being. The compressor is also bugged in other ways when I tested on samples from Yakuza Kiwami. Reading and writing to stdin/stdout hasn't been added yet so it's even slower since data needs to be extracted to disk.

Here's some information about this algorithm from its header:

Code:
First 4 bytes, Magic: SLLZ
Next byte, endianness: 00 (little)
Next byte, version: 01 or 02 (compression version - v2 is zlib I think)
Next 2 bytes is header size (from what I've seen, always 0x1000 because the header is always 16 bytes in my findings)
Next 4 bytes is decompressed size.
Next 4 bytes is compressed size.

Total: 16 bytes
Code:
[Stream1]
Name=yakuza
Codec=sllz
BigEndian=0
Signature=0x5A4C4C53
Structure=Signature(4),Endianness(1),Version(1),HeaderSize(2),CSize(4),DSize(4),Stream
StreamOffset=-16
CompressedSize=CSize
DecompressedSize=DSize
Code:
xtool precomp -myakuza -df20p -c128mb -t12 hact.par
XTool is created by Razor12911

Streams: 873 / 3397
Time: 00:11:34 (CPU 00:00:17)

Size: 398 MB >> 404 MB
I will probably drop this project for a bit and return to it sometime in the future
Attached Files
File Type: 7z XT_SLLZ.7z (331.9 KB, 32 views)
Reply With Quote
The Following 2 Users Say Thank You to Masquerade For This Useful Post:
Gehrman (02-07-2023), ScOOt3r (24-06-2023)