Table of Contents

Class StringCompression

Namespace
FishMMO.Shared
Assembly
FishMMO-SharedUtility.dll

Provides high-performance utility methods for compressing strings using GZip and Base64. Optimized for memory usage and high-concurrency environments.

public static class StringCompression
Inheritance
StringCompression
Inherited Members

Methods

CompressString(string)

Compresses a string using GZip and encodes the result as a Base64 string.

public static string CompressString(string input)

Parameters

input string

Returns

string

DecompressString(string)

Decompresses a Base64-encoded, GZip-compressed string back to its original UTF8 form.

public static string DecompressString(string compressedInput)

Parameters

compressedInput string

Returns

string

ReadCompressedStringFromFile(string)

Reads a raw GZip file and returns the decompressed UTF8 string.

public static string ReadCompressedStringFromFile(string filePath)

Parameters

filePath string

Returns

string

WriteCompressedStringToFile(string, string)

Writes a compressed string to a file as raw binary.

public static void WriteCompressedStringToFile(string compressedString, string filePath)

Parameters

compressedString string
filePath string