1. Trouble with the game?
    Try the troubleshooter!

    Dismiss Notice
  2. Issues with the game?
    Check the Known Issues list before reporting!

    Dismiss Notice

Game ZIPs are uncompressed, why?

Discussion in 'General Discussion' started by Firepal3D, Apr 10, 2024.

  1. Firepal3D

    Firepal3D
    Expand Collapse

    Joined:
    Mar 26, 2022
    Messages:
    27
    If you look in the installation directory of the game (not the user folder!) and go to the "content" folder, you'll see "vehicles" and "levels" folders.
    Those are filled with zips, one zip for each vehicle or map.
    But those ZIPs aren't compressed. They just store the data like a raw tar file.
    I'm just honestly wondering why that is?

    When you pack an unpacked mod, it's packed into a zip file with "Deflate" compression as one would expect. And BeamNG is totally capable of loading compressed zips.

    I even wrote a Python script that compresses all zips in those "vehicles" and "levels" folders.
    I could save a few GBs this way without affecting functionality.

    Is this for the sake of smaller patches?
     
  2. Leo Zieger

    Leo Zieger
    Expand Collapse

    Joined:
    Jan 12, 2023
    Messages:
    827
  3. catchow1977

    catchow1977
    Expand Collapse

    Joined:
    Jun 2, 2022
    Messages:
    1,674
    Maybe if there was an option to either zip or unzip the folders depending on you circumstances
     
  4. Firepal3D

    Firepal3D
    Expand Collapse

    Joined:
    Mar 26, 2022
    Messages:
    27
    I, uh, already know you can do that, I said it in my post... I'm asking why they don't ship them compressed as standard.
    --- Post updated ---
    Ah well stenyak said it there. Too bad.
    --- Post updated ---
    My take is that I/O is often a bigger performance bottleneck than CPU, and compression reduces I/O by making the CPU work...
    Something they could consider at worst is implementing zstd, which is the fastest practical compression algorithm.
     
  5. stenyak

    stenyak
    Expand Collapse
    Programmer & Global Moderator
    BeamNG Team

    Joined:
    Aug 6, 2012
    Messages:
    1,996
    We are aware of zstd (it's what replay system has always used to prevent tanking the framerate too much while recording), but it's a solution that has both benefits and drawbacks if you want to apply it to other areas. The end result of those considerations, is what you see currently implemented.
     
    • Like Like x 1
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice