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
inputstring
Returns
DecompressString(string)
Decompresses a Base64-encoded, GZip-compressed string back to its original UTF8 form.
public static string DecompressString(string compressedInput)
Parameters
compressedInputstring
Returns
ReadCompressedStringFromFile(string)
Reads a raw GZip file and returns the decompressed UTF8 string.
public static string ReadCompressedStringFromFile(string filePath)
Parameters
filePathstring
Returns
WriteCompressedStringToFile(string, string)
Writes a compressed string to a file as raw binary.
public static void WriteCompressedStringToFile(string compressedString, string filePath)