Paper icon indicating copy to clipboard operation
Paper copied to clipboard

Configurable compression format

Open Astralchroma opened this issue 2 years ago • 6 comments

Adds a configuration option to save region files without any compression, this is useful for any servers which wish to use compression at the file system level.

Minecraft already has the ability to save and load region files without compression, however the ability to save isn't used, and this adds a config option to enable that. As Minecraft supports regions saved this way, the worlds saved using this option remain compatible with an unmodified client / server.

Astralchroma avatar Oct 25 '22 16:10 Astralchroma

Just as a general thought, wouldn't it be a bit more future proof to have this more of an enum value, rather than a boolean ?

E.g. right now this option lets you switch between deflate and none, however potentially the server offers different IO wrappers in the future here. Instead of a boolean, this could simply default to "deflate", with the possible alternative format of "plain" or something along those lines.

Minecraft already has support for 3 compression formats (gzip, zlib (default), and none), although I don't see why anyone would want to use gzip over zlib or none, but I suppose if we're adding a option for default or none, we may as well just use an enum and allow all 3, so I'll do that. Although I don't think this enum should be used by Paper to add alternative formats in the future as formats added by Paper would be incompatible with Vanilla.

Astralchroma avatar Oct 27 '22 20:10 Astralchroma

As formats added by Paper would be incompatible with Vanilla.

I know that this is something that is technically possible with some folder moving, but moving worlds from Paper to vanilla is something that I hope people can understand may cause issues.

If enough of a warning notice is placed on it when the user selects it, I have no problem with this.

There is potential for a converter tool to be developed to change it back anyways, so I +1 an enum for (the possibility of) new formats as ultimately Paper is here to improve the server experience.

olijeffers0n avatar Oct 27 '22 21:10 olijeffers0n

Updated to rebase on master (apparently I forgot to do that before), as well as use a supplier like @Machine-Maker suggested, as well as changing it to use an enum.

Astralchroma avatar Oct 27 '22 21:10 Astralchroma

This has been rebased onto master now, any chance this could be merged soon?

Astralchroma avatar Jan 07 '23 15:01 Astralchroma

This was discussed somewhere, but I think that this config option should be moved to the unsupported category. It's not officially supported by mojang and I am not sure this is something we should officially support too.

Owen1212055 avatar Jan 07 '23 15:01 Owen1212055

This was discussed somewhere, but I think that this config option should be moved to the unsupported category. It's not officially supported by mojang and I am not sure this is something we should officially support too.

That makes sense, I've gone ahead and done that

Astralchroma avatar Jan 07 '23 15:01 Astralchroma

Rebased

Astralchroma avatar Mar 30 '23 20:03 Astralchroma

the rebase required label can removed btw

Astralchroma avatar Apr 07 '23 17:04 Astralchroma