Skip to content

Possibly showing incorrect estimated saving from database #543

Closed

Description

@darklinkpower

Using Version 4.0 Beta 5

I'm a little confused, the estimation numbers being displayed don't match neither the data found in the "Compression DB" tab or the database json.

Example:

A Short Hike

Image

Image

It's mixing the numbers:

  • Estimated saving percentage for XPRESS8K (27%) in database -> Shown under LZX in folder scan
  • Estimated saving percentage for LZX (31%) in database -> Shown under XPRESS16K in folder scan

Adiditionally, in the database json only one estimation is available:

Image

242310177 bytes -> 231.1MB (I think ?)
"CompType":1 -> XPRESS8K

Image


From the information above, I think that:

  1. The data found in the Compression DB tab is correct, although I don't understand where the LZX data is coming from, unless the program uses a different data source
  2. The estimated savings for game scans is assigning the incorrect estimates data to compression types

Activity

  1. darklinkpower commented on Jul 4, 2025

    @darklinkpower
    Author

    I think this is an example that can clearly tells what is incorrect:

    Image

    Image

    Database Compression Shown as in Folder Scan
    XPRESS4K XPRESS4K ❎
    XPRESS8K LZX ❌
    XPRESS16K XPRESS8K ❌
    LZX XPRESS16K ❌
  2. Iridium-IO commented on Jul 4, 2025

    @Iridium-IO
    Member

    Good catch, I think it's because I'm using two different mappings throughout the program (which I really shouldn't do) and got them wrong for the buttons. The buttons should use CompressionMode but I've incorrectly used WOFComperssionAlgorithm

    public enum CompressionMode: int
    {
        XPRESS4K = 0,
        XPRESS8K = 1,
        XPRESS16K = 2,
        LZX = 3,
        None = 4
    }
    
    
    public enum WOFCompressionAlgorithm: int
    {
        NO_COMPRESSION = -2,
        LZNT1 = -1,
        XPRESS4K = 0,
        LZX = 1,
        XPRESS8K = 2,
        XPRESS16K = 3
    }

    Windows uses the second one internally so I need to convert between the two and I keep mixing them up haha. I'll fix this soon :)

  3. added theissue type on Jul 4, 2025
  4. added a commit that references this issue on Jul 5, 2025
    19c1356
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions