Table of Contents

Enum CompressionMode

Namespace
KeenEyes.Serialization
Assembly
KeenEyes.Core.dll

Specifies the compression algorithm used for save files.

public enum CompressionMode

Fields

Brotli = 2

Brotli compression using BrotliStream.

Brotli typically achieves better compression ratios than GZip (10-20% smaller) but requires more CPU time, especially for compression.

Use when file size is more important than save/load performance, such as for cloud saves where bandwidth is a concern.

GZip = 1

GZip compression using GZipStream.

GZip provides a good balance between compression ratio and speed. Typically achieves 60-80% size reduction for ECS world data.

This is the recommended default for most applications.

None = 0

No compression. Data is stored as-is.

Use when save/load speed is critical or when data is already compressed.

Remarks

Compression can significantly reduce save file sizes at the cost of additional CPU time during save/load operations. The optimal choice depends on your use case:

  • None - Fastest, no compression overhead
  • GZip - Good balance of speed and compression ratio
  • Brotli - Best compression ratio, slower than GZip