Class AutoCompressString
A immutable class that wraps a string with support for compression
Inheritance
System.Object
AutoCompressString
Namespace: EPiServer.Util.Internal
Assembly: EPiServer.dll
Version: 12.0.3Syntax
public class AutoCompressString : Object
Remarks
Important! You cannot change the state of this class after compression
Constructors
AutoCompressString(String)
Initializes a new instance of the AutoCompressString class.
Declaration
public AutoCompressString(string str)
Parameters
Type | Name | Description |
---|---|---|
System.String | str | The string to be wrapped |
Fields
Empty
An empty string
Declaration
public static readonly AutoCompressString Empty
Field Value
Type | Description |
---|---|
AutoCompressString |
Properties
Threshold
Gets the value for when strings are compressed
Declaration
public static int Threshold { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
SetThreshold(Int32)
Set the global threshold for when strings are compressed
Declaration
public static void SetThreshold(int val)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | val | The size of the threshold |
ToString()
Main method to read string value
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Remarks
This method is stateless and must always be
WriteTo(TextWriter)
Unzip compressed data and stream to writer
Declaration
public void WriteTo(TextWriter writer)
Parameters
Type | Name | Description |
---|---|---|
System.IO.TextWriter | writer |