ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax
It is currently Sat Aug 13, 2022 3:53 am

All times are UTC




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Mon Dec 13, 2021 1:12 am 
User avatar

Joined: Wed Nov 18, 2020 5:54 pm
Posts: 20
hello, id like to know where the c library for the lzss0 compression scheme is
i want to also know how to calculate the size of the compressed file
i will need to lzss0 compression library for a third-party tool developed by yours truly called nmr2l

oh just for reference the game files ill be working with are from Namco Museum Remix
i just need a c header file or something that will let me compress and decompress raw lzss0 data

thanks

_________________
-Garo


Top
   
PostPosted: Mon Dec 13, 2021 6:07 am 
User avatar

Joined: Sat Dec 27, 2014 8:49 pm
Posts: 241
You can download and use the source of quickbms which has support for lzss/lzssx files:
http://aluigi.altervista.org/papers/qui ... 0.11.0.zip

File you'd want to check is:
\included\lzss.c

_________________
My personal site: http://atom0s.com
Donations can be made via Paypal: Click Here


Top
   
PostPosted: Mon Dec 13, 2021 2:59 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 12982
lzss0 is just the normal LZSS with the only difference that initialize the window buffer with a NUL byte instead of a space.
Any implementation is ok as long as it has the default settings: EI = 12, EJ = 4, P = 2.
The one in quickbms is big because it covers all the settings, probably you want something much simpler and easy.

For example this one is from Okumura (who wrote one of the oldest public domain implementations, the following seems a short uncommented rewrite):
https://oku.edu.mie-u.ac.jp/~okumura/compression/lzss.c
As you can see EI and P are different so you must set as I said before.
And obviously you must change the two occurrencies of the "space" ' ' to 0.

Super easy ;)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 3 posts ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited