Class LatinEncoding
This class emulates latin1 encoding based on Unicode encoding.
Inheritance
Namespace: Syncfusion.Compression
Assembly: Syncfusion.Compression.Base.dll
Syntax
public class LatinEncoding : Encoding
Constructors
LatinEncoding()
Declaration
public LatinEncoding()
Methods
GetByteCount(Char[], Int32, Int32)
Calculates the number of bytes produced by encoding a set of characters.
Declaration
public override int GetByteCount(char[] chars, int index, int count)
Parameters
Type | Name | Description |
---|---|---|
System.Char[] | chars | The character array containing the set of characters to encode. |
System.Int32 | index | The index of the first character to encode. |
System.Int32 | count | The number of characters to encode. |
Returns
Type | Description |
---|---|
System.Int32 | The number of bytes produced by encoding the specified characters. |
GetBytes(Char[], Int32, Int32, Byte[], Int32)
Encodes a set of characters from the specified character array into the specified byte array.
Declaration
public override int GetBytes(char[] chars, int charIndex, int charCount, byte[] bytes, int byteIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Char[] | chars | The character array containing the set of characters to encode. |
System.Int32 | charIndex | The index of the first character to encode. |
System.Int32 | charCount | The number of characters to encode. |
System.Byte[] | bytes | The byte array to contain the resulting sequence of bytes. |
System.Int32 | byteIndex | The index at which to start writing the resulting sequence of bytes. |
Returns
Type | Description |
---|---|
System.Int32 | The actual number of bytes written into bytes. |
GetCharCount(Byte[], Int32, Int32)
Calculates the number of characters produced by decoding a sequence of bytes from the specified byte array.
Declaration
public override int GetCharCount(byte[] bytes, int index, int count)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | bytes | The byte array containing the sequence of bytes to decode. |
System.Int32 | index | The index of the first byte to decode. |
System.Int32 | count | The number of bytes to decode. |
Returns
Type | Description |
---|---|
System.Int32 | The number of characters produced by decoding the specified sequence of bytes. |
GetChars(Byte[], Int32, Int32, Char[], Int32)
Decodes a sequence of bytes from the specified byte array into the specified character array.
Declaration
public override int GetChars(byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | bytes | The byte array containing the sequence of bytes to decode. |
System.Int32 | byteIndex | The index of the first byte to decode. |
System.Int32 | byteCount | The number of bytes to decode. |
System.Char[] | chars | The character array to contain the resulting set of characters. |
System.Int32 | charIndex | The index at which to start writing the resulting set of characters. |
Returns
Type | Description |
---|---|
System.Int32 | The actual number of characters written into chars |
GetMaxByteCount(Int32)
Calculates the maximum number of bytes produced by encoding the specified number of characters.
Declaration
public override int GetMaxByteCount(int charCount)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | charCount | The number of characters to encode. |
Returns
Type | Description |
---|---|
System.Int32 | The maximum number of bytes produced by encoding the specified number of characters. |
GetMaxCharCount(Int32)
Calculates the maximum number of characters produced by decoding the specified number of bytes.
Declaration
public override int GetMaxCharCount(int byteCount)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | byteCount | The number of bytes to decode. |
Returns
Type | Description |
---|---|
System.Int32 | The maximum number of characters produced by decoding the specified number of bytes. |