Repetier-Host Plugin  2.0.0
RepetierHostExtender.basic.CompressedString Class Reference

C# stores strings as arrach of 16 bit chars. Especially with gcode which uses only 7 bit ascii it is a waste of ram if storing many lines. This class converts standard strings to byte arrays and back for a better memory print. More...

Public Member Functions

 CompressedString (string text)
 
 CompressedString (byte[] text)
 
override string ToString ()
 

Static Public Member Functions

static byte [] Compress (string text)
 
static string Uncompress (byte[] data)
 

Static Public Attributes

static System.Text.UTF8Encoding enc = new UTF8Encoding()
 

Detailed Description

C# stores strings as arrach of 16 bit chars. Especially with gcode which uses only 7 bit ascii it is a waste of ram if storing many lines. This class converts standard strings to byte arrays and back for a better memory print.

You can use either the class itself which has the overhead of an additional reference to byte array or use the static function directly to switch between byte array and string.


The documentation for this class was generated from the following file:
About Us | Privacy Policy