SaaS CMS has officially launched! Learn more now.

Class AutoCompressString

A immutable class that wraps a string with support for compression

Inheritance
System.Object
AutoCompressString
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Util
Assembly: EPiServer.dll
Version: 7.19.2
Syntax
public class AutoCompressString
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

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
Overrides
System.Object.ToString()
Remarks

This method is stateless and must always be

Extension Methods