LZ4Codec Class
Namespace: Stride.Core.LZ4Assembly: Stride.Core.Serialization.dll
LZ$ codec selecting best implementation depending on platform.
public static class LZ4Codec
Name | Description | |
---|---|---|
Properties | ||
CodecName | Gets the name of selected codec(s). |
|
Methods | ||
Decode(Byte[], Int32, Int32, Byte[], Int32, Int32, Boolean) | Decodes the specified input. |
|
Decode(Byte[], Int32, Int32, Int32) | Decodes the specified input. |
|
Encode(Byte[], Int32, Int32) | Encodes the specified input. |
|
Encode(Byte[], Int32, Int32, Byte[], Int32, Int32) | Encodes the specified input. |
|
EncodeHC(Byte[], Int32, Int32) | Encodes the specified input. |
|
EncodeHC(Byte[], Int32, Int32, Byte[], Int32, Int32) | Encodes the specified input. |
|
MaximumOutputLength(Int32) | Get maximum output length. |
Properties
CodecName
Gets the name of selected codec(s).
public static string CodecName { get; }
Property Value
Type | Description |
---|---|
System.String | The name of the codec. |
Methods
Decode(Byte[], Int32, Int32, Byte[], Int32, Int32, Boolean)
Decodes the specified input.
public static int Decode(byte[] input, int inputOffset, int inputLength, byte[] output, int outputOffset, int outputLength = 0, bool knownOutputLength = false)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | input | The input. |
System.Int32 | inputOffset | The input offset. |
System.Int32 | inputLength | Length of the input. |
System.Byte[] | output | The output. |
System.Int32 | outputOffset | The output offset. |
System.Int32 | outputLength | Length of the output. |
System.Boolean | knownOutputLength | Set it to |
Returns
Type | Description |
---|---|
System.Int32 | Number of bytes written. |
Decode(Byte[], Int32, Int32, Int32)
Decodes the specified input.
public static byte[] Decode(byte[] input, int inputOffset, int inputLength, int outputLength)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | input | The input. |
System.Int32 | inputOffset | The input offset. |
System.Int32 | inputLength | Length of the input. |
System.Int32 | outputLength | Length of the output. |
Returns
Type | Description |
---|---|
System.Byte[] | Decompressed buffer. |
Encode(Byte[], Int32, Int32)
Encodes the specified input.
public static byte[] Encode(byte[] input, int inputOffset, int inputLength)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | input | The input. |
System.Int32 | inputOffset | The input offset. |
System.Int32 | inputLength | Length of the input. |
Returns
Type | Description |
---|---|
System.Byte[] | Compressed buffer. |
Encode(Byte[], Int32, Int32, Byte[], Int32, Int32)
Encodes the specified input.
public static int Encode(byte[] input, int inputOffset, int inputLength, byte[] output, int outputOffset, int outputLength)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | input | The input. |
System.Int32 | inputOffset | The input offset. |
System.Int32 | inputLength | Length of the input. |
System.Byte[] | output | The output. |
System.Int32 | outputOffset | The output offset. |
System.Int32 | outputLength | Length of the output. |
Returns
Type | Description |
---|---|
System.Int32 | Number of bytes written. |
EncodeHC(Byte[], Int32, Int32)
Encodes the specified input.
public static byte[] EncodeHC(byte[] input, int inputOffset, int inputLength)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | input | The input. |
System.Int32 | inputOffset | The input offset. |
System.Int32 | inputLength | Length of the input. |
Returns
Type | Description |
---|---|
System.Byte[] | Compressed buffer. |
EncodeHC(Byte[], Int32, Int32, Byte[], Int32, Int32)
Encodes the specified input.
public static int EncodeHC(byte[] input, int inputOffset, int inputLength, byte[] output, int outputOffset, int outputLength)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | input | The input. |
System.Int32 | inputOffset | The input offset. |
System.Int32 | inputLength | Length of the input. |
System.Byte[] | output | The output. |
System.Int32 | outputOffset | The output offset. |
System.Int32 | outputLength | Length of the output. |
Returns
Type | Description |
---|---|
System.Int32 | Number of bytes written. |
MaximumOutputLength(Int32)
Get maximum output length.
public static int MaximumOutputLength(int inputLength)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | inputLength | Input length. |
Returns
Type | Description |
---|---|
System.Int32 | Output length. |