Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    LZ4Codec Class

    Namespace: Stride.Core.LZ4
    Assembly: Stride.Core.Serialization.dll

    LZ$ codec selecting best implementation depending on platform.

    System.Object → LZ4Codec
    Derived from LZ4Codec:

    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.

    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    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 true if output length is known.

    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.


    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation