Results 1 to 13 of 13

Thread: LZSS recompressor to a graphics archive

  1. #1
    Member
    Join Date
    Aug 2018
    Location
    Brazil
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    LZSS recompressor to a graphics archive

    Hi everyone, this is my first post here. I would like to know if someone can write for me an LZSS recompressor to a graphics archive, this graphics archive is from a videogame called Project Zero II (PS2 Version). I have two bms scripts that decompress the graphic archive, the graphic archive is in this link: https://drive.google.com/file/d/19A4...w?usp=drivesdk
    The "LESS20" file in the link is the graphic archive, the bms script "LESS Decompressor" decompress the "LESS20" and the "LED to tm2 textures" extract the tm2 textures from the LESS20.LED that is the LESS20 decompressed with the LESS Decompressor script. I use the quickbms to use the scripts to decompress the archives, the quickbms reimport the tm2 textures after edited to the LESS20.LED, but don't recompress the LESS20.LED to the LESS20 again. I need of a recompressor to the LESS20.LED. The LESS20 is 65Kb and after decompressed is 149Kb, the LZSS recompressor must compress the 149Kb size to 65Kb again to the game engine read correctly the tm2 textures edited and reimported. I know that the algorithm used is the LZSS, but this is all that I know.

  2. #2
    Administrator Shelwien's Avatar
    Join Date
    May 2008
    Location
    Kharkov, Ukraine
    Posts
    3,942
    Thanks
    291
    Thanked 1,286 Times in 728 Posts
    http://nishi.dreamhosters.com/u/less_v0.rar

    quickbms actually has working encoder for this.

  3. #3
    Member
    Join Date
    Aug 2018
    Location
    Brazil
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks! I'll test here and post the results.

  4. #4
    Member
    Join Date
    Aug 2018
    Location
    Brazil
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi, I've tested here the "less" tool with the
    original textures from the graphics archive
    and the recompression works very well. I
    tested a original texture compressed
    with the "less" tool and the game works
    fine, but when I compress a modified/
    edited texture, the tool start an infinite
    loop as in this picture https://m.imgur.com/gallery/kFHN4Uw
    and don't stop. When I insert the "2"
    texture file edited and compressed in
    the game, only the original texture
    shows in the game. It seems that
    the tool do not recompress edited
    textures and create the "2" file as
    a copy of original .LED decompressed,
    but when I compress the original texture,
    all works fine. The my edited texture has
    the same size of texture original, no byte
    the most, no byte less than a difference,
    what can be done in this case?

  5. #5
    Administrator Shelwien's Avatar
    Join Date
    May 2008
    Location
    Kharkov, Ukraine
    Posts
    3,942
    Thanks
    291
    Thanked 1,286 Times in 728 Posts
    That's not "infinite loop" in the picture.
    Just remove/disable fc calls in the .bat script, its obvious that files won't match if you use a modified file.

  6. #6
    Member
    Join Date
    Aug 2018
    Location
    Brazil
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    So how I can insert the modified/edited textures if them do not match? Anyway I'll disable the calls to see the result

  7. #7
    Member
    Join Date
    Aug 2018
    Location
    Brazil
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi. I've tested here and the edited textures can not be compressor, only the originals. Can you adapt the tool to recompress the modified textures?

  8. #8
    Administrator Shelwien's Avatar
    Join Date
    May 2008
    Location
    Kharkov, Ukraine
    Posts
    3,942
    Thanks
    291
    Thanked 1,286 Times in 728 Posts
    It doesn't know whether the file is modified. There're some questions about chunk alignment, but if file's size is not changed, that's probably not it.
    Post more info. Maybe quickbms can't reimport modified files? Then its not my problem.

    Well, here's an updated version - http://nishi.dreamhosters.com/u/less_v0a.rar
    I tried changing alignment to 32 (thought maybe hdr.UNK2 is alignment), but it doesn't work.

  9. #9
    Member
    Join Date
    Aug 2018
    Location
    Brazil
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'll try here with this new version, about more infos for this format file, I've found this tool https://github.com/wmltogether/ZeroU...ter/DeLESS.exe made specially to decompress the LESS files of Project Zero 2 that is the game in which I am working to translate, the texts I managed to translate all them, but is missing the texts in the graphics. Maybe debugging this tool allow to know all the structure of the LESS files and create the recompressor from it. The problem is that I don't understand debugging and programming language

  10. #10
    Administrator Shelwien's Avatar
    Join Date
    May 2008
    Location
    Kharkov, Ukraine
    Posts
    3,942
    Thanks
    291
    Thanked 1,286 Times in 728 Posts
    To clarify my previous post, my encoder should work with any file - I tested encoding and decoding of some random files, and it works.
    So its not a matter of understanding LESS headers or anything like that.
    You have to explain what exactly doesn't work - less.exe crashes on some file, quickbms doesn't want to reimport, game doesn't work with updated resources,... what happens?

  11. #11
    Member
    Join Date
    Aug 2018
    Location
    Brazil
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The game work with updated resources, I've replaced a texture with an equals texture of another language used in the game, and works well. The quickbms reimport the edited textures to the LED file, I reimport and extract the LED again and the edited texture is there, but when I compress the LED file using the tool, the "2" file generated that is the LED compressed has no the edited texture, only the originals. I decompress the "2" file generated and the edited texture is no there. It seems this happen only with the LESS files of this game, the "2" file is a copy of original without the modified textures, but the tool don't crash, only don't compress the modified LED

  12. #12
    Administrator Shelwien's Avatar
    Join Date
    May 2008
    Location
    Kharkov, Ukraine
    Posts
    3,942
    Thanks
    291
    Thanked 1,286 Times in 728 Posts
    Well, you do something wrong.
    Try using less.exe without that bat script.

    compress a file: less c input output
    decompress: less d input output

    You can check that correct file is decompressed, etc.

  13. #13
    Member
    Join Date
    Aug 2018
    Location
    Brazil
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Now is working perfectly! I've tested in the game with the modified textures and is working fine. Thankyou very much by help and patience.

Similar Threads

  1. reflate - a new universal deflate recompressor
    By Shelwien in forum Data Compression
    Replies: 131
    Last Post: 4th December 2019, 08:08
  2. Replies: 0
    Last Post: 9th May 2018, 18:12
  3. State-of-the-art recompressor for DXT and raw graphics.
    By Chirantan in forum The Off-Topic Lounge
    Replies: 0
    Last Post: 24th January 2018, 14:33
  4. lzma recompressor
    By Shelwien in forum Data Compression
    Replies: 33
    Last Post: 25th February 2016, 22:40
  5. Wondering whether to release my deflate recompressor
    By m^2 in forum Data Compression
    Replies: 15
    Last Post: 4th November 2011, 19:31

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •