RimWorld

RimWorld

102 ratings
Save File Compression
4
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.2, 1.3, 1.4, 1.5, 1.6
File Size
Posted
Updated
1.517 MB
5 Sep @ 1:23pm
12 Sep @ 11:34pm
3 Change Notes ( view )

Subscribe to download
Save File Compression

Description

Use compression to save your game
Vanilla's game save files are stored in plain text, so editing your save file is easy, but they can get to hundred(s) of Megabytes in size.
With this mod, they get shrunk to anywhere from 20% to 5% of the size of vanilla, saving your hard drive space. It can also speed up your saving process in some computers.
This mod does not simply repack the vanilla save file as a zip. Instead it intercepts the game's saving process itself, so as the game attempts to write save data, the data are intercepted, compressed and written to disk all at the same time.

There were many other mods that has done this before, but my mod has these differences/advantages:
1. Supports ZStandard compression format, which is much faster and result in smaller files than deflate which other mods support.
2. Can read save files from vanilla and all other save file compression mods that I've seen.
3. Supports 1.2-1.6 using the exact same common compression/decompression library, so likely long term stable.
4. Free and open source[en.wikipedia.org].

Supported compression formats compared to vanilla/similar mods:
XML (text)
Gzip
Raw Deflate
✅ (Can read but can't save as this format)
ZStandard
中文介绍在这

[github.com]


During normal gameplay:
This mod has no performance impact since no code is run.
When saving game:
If you have a slow hard drive (such as a mechanical hard drive) this mod can speed up your saving process by having less data to write to your hard drive.
In other computers, the bottleneck is the game itself preparing the data to be saved; then the mod neither speed up nor slow down the saving speed.
(This is unlikely) If you find that saving the game seem to take longer, you can decrease the compression level in the mod settings to speed it up.
You can configure the level of compression in the mod's settings, lower number is faster, while higher number result in smaller files.


This mod had no issue in my own 800+ mod list, so it's probably going to be compatible with your mods.
Support RimWorld 1.2-1.6 and all DLCs. Will most likely support future RimWorld versions when they come out.
RimWorld 1.1 and below won't be supported due to lack of Harmony2 support.

Confirmed compatible with:
RimSaves

The following mods have built-in compatibility patches:
Better ModMismatch Window

These mods are similar in function to this mod, so they can't be loaded together; this mod can read saves produced by them.
Savegame Compressor [1.1 - 1.4]
Savegame Compressor (Continued)
RimKeeper - Save Compressor
RWS Compressor

This mod is safe to add mid-save.
If you remove the mod mid-save, you would need to manually extract (uncompress) the save files to be able to load them:
1. When using ZStandard compression format, you can use 7-Zip-zstd[github.com] (not the standard 7-Zip) to extract into vanilla's plain text save file (don't forget the ".rws" file affix).
2. When using Gzip compression format, most decompression software can extract the compressed game file into vanilla's plain text save file, and some text editors such as Kate can edit the compressed file directly without extracting first.
3. Alternatively, you can set the mod setting to disable compression and manually re-save the games so you can load the saves after removing this mod.

Languages
Has built-in support for: English, Chinese (Simplified/Traditional)
Let me know if you make a translation mod for this mod, so that I can add your translation mod here too.


1. Some formats (raw deflate, ZStandard) do not save information about its uncompressed size, so you might not be able to read the uncompressed size of the save file. However, this will NOT brick your save and you can still load the game normally.
2. This mod does not currently support batch compressing/uncompressing saves, you may want to use an external tool such as 7-Zip-zstd to do that.
3. Only save games (and not scnearios/ideology presets from the Ideology DLC/gene presets from the Biotech DLC, etc.) are compressed, this is done on purpose for mod compatibility, and the other files tend to be very small anyways.
4. Sometimes saves manually compressed to ZStandard format using third party software would fail to load; therefore when manually compressing your save game, Gzip is preferred over ZStandard.
5. The mod Savegame Shrinker's UI buttons may block some informational text from this mod; it does not impact gameplay or saving/loading games.
6. When using RimSort, you can't load the modlist from a zstd compressed save, though gzip and normal modlists work fine.


The workshop page graphics and mod icon are made by Happycam.
Some ideas are taken from the mod Savegame Compressor [1.1 - 1.4] and RimKeeper - Save Compressor; I only took the ideas and not their code.
This mod makes use of ZstdSharp Port[www.nuget.org] and ILRepack Lib MSBuild Task[www.nuget.org] in binary format. Both are MIT Licensed.
All code are written by me (AmCh), released under LGPL 2.1 License[www.gnu.org]. I'd appreciate it if you let me know of your redistribution, but it's not required.

My other mods
Need Bar Overflow
Improved Need Indicator
More Sleep Accelerators
Configurable Deconstruct Percentage
46 Comments
pillbug2 28 Sep @ 8:56pm 
Very nice work. This is essential.
VitaKaninen 13 Sep @ 4:01pm 
Nice! Thanks so much!
AmCh  [author] 13 Sep @ 3:22pm 
@Starempire42
Yes, I wrote a patch for them and they've merged it, now RimSort v1.0.44 is compatible with saves from this mod :steamhappy:
-----
我给RimSort那边添加了编辑修改,v1.0.44以后版本的RimSort完全兼容这个模组压缩的存档了。
Starempire42 13 Sep @ 2:26pm 
Do correct me if I am wrong though
Starempire42 13 Sep @ 2:26pm 
I do believe they have added compatibility with this mod after the newest rimsort version :D
AmCh  [author] 13 Sep @ 2:25pm 
@Tyrant
That is planned! I will add it at some point.
Tyrant 13 Sep @ 1:51pm 
I'm hoping to see a batch compress/uncompress feature like RimKeeper at some point.
AmCh  [author] 12 Sep @ 11:35pm 
Mod updated to version 1.0.1: Attempted to fix some multi-threading issues I suspect.
模组已经更新至1.0.1版本:尝试修复了一些我怀疑存在的多线程崩溃错误。
Consho 12 Sep @ 8:50pm 
@AmCh Thank you bro!
AmCh  [author] 12 Sep @ 8:30pm 
@Consho
Glad to hear that it worked! :steamhappy: