View Single Post
  #11  
Old 10-04-2026, 16:42
wrathma wrathma is offline
Registered User
 
Join Date: Apr 2024
Location: Dhaka
Posts: 60
Thanks: 46
Thanked 40 Times in 23 Posts
wrathma is on a distinguished road
wem(un)pak

This is a more feature packed version of Masquerade's WemTool that i made few months ago to compress wem files from Silent Hill f. As it was made with golang, the binary sizes are huge. I didnt want to port this entire thing ito c, so today i added a feature to generate a batch script to decompress the files. Then you can run the batch script in parallel with prl or Mparallel. It follows same file naming standards as original WemTool. So you can use wempack to decompress WemTool compressed data. Attachments include source code.
  • Separate compressor and decompressor.
  • Ability to compare input and compressed sizes.
  • Works recursively.
  • Ability to specify compressor for hdiffz.
  • Ability to generate a batch script to decompress.
  • Better error handling and processing structure:
  • compressor : ww2ogg > oggre_enc > oggre_dec > hdiffz
  • decompressor : oggre_dec > hdiffz
  • If any of the steps fails, the tool skips that file automatically. Temporary files are deleted in every step of processing, WemTool processes all files and then removes temps at the very end, leaving a huge mess and sometimes filling up the disk.

Code:
 SYMM's WEM packer

 - Compresses .wem to .ww + .DIFFZ

 Usage: wem-packer.exe [options] <directory>

 Options:
   -tN    number of threads (e.g. -t4/defaults to cpu count)
   -s     skip if output (.ww + .DIFFZ) is larger than input (.wem)
   -b     keep original .wem files
   -cX    compressor for hdiffz, default = none.
   -h     show this help message
Code:
 SYMM's WEM unpacker

 - Decompresses .ww + .DIFFZ to .wem

 Usage: wem-unpacker.exe [options] <directory>

 Options:
   -tN    number of threads (e.g. -t4)
   -b     keep original .ww and .DIFFZ files
   -n     generate a batch script to decompress
   -h     show this help message
Credits:
  • Masquerade for the guide
  • Sisong for hpatchz/hdiffz
  • hsc64 for ww2ogg
  • Profrager for oggre
Attached Files
File Type: 7z wempak.7z (1.69 MB, 12 views)

Last edited by wrathma; 20-04-2026 at 04:26.
Reply With Quote
The Following 2 Users Say Thank You to wrathma For This Useful Post:
KaktoR (10-04-2026), kj911 (11-04-2026)