View Single Post
  #31  
Old 09-01-2021, 21:19
Razor12911's Avatar
Razor12911 Razor12911 is offline
Noob
 
Join Date: Jul 2012
Location: South Africa
Posts: 3,749
Thanks: 2,170
Thanked 11,206 Times in 2,307 Posts
Razor12911 is on a distinguished road
You do realize that almost each time lz4 is updated on github it compresses data a bit differently? This "bit differently" is why xtool from the beginning allows users to change the library however they want so they pick whichever one gives the best result. When it comes to lz4, there is no universal dll for all games so if you want to add support, you must tell the user to always add the libraries that come with plugins to the DiskSpan_GUI folder.

The lz4 library I ship in xtool is v1.8.3 which is the commonly used library, some games use an older and some use a newer but nonetheless if the streams cannot be restored correctly, xdelta is applied.

If the user uses the incorrect liblz4.dll, xtool tries to use xdelta on the streams and if the user chose the wrong one or does not use the one that comes with a plugin, you end up with negative ratio. Where using a precompressor just gives worse result.

This is seen here, although I am not sure how this situation in particular happened...

Edit: The same is true with zstd, each update causes xtool to use xdelta to try to salvage some streams. Zlib would also be using the same method of xdelta but other libraries such as reflate and preflate exist that handle streams that zlib can't and when it comes to the situation of lz4, there is no such tool.

Last edited by Razor12911; 09-01-2021 at 21:24.
Reply With Quote
The Following 4 Users Say Thank You to Razor12911 For This Useful Post:
Cesar82 (09-01-2021), Ele (10-01-2021), KaktoR (10-01-2021), parnexcodes (10-01-2021)
Sponsored Links