Skip to content
Roblox API Reference

EncodingService

Service providing common encoding, hashing, and compression methods.
  • Not creatable
  • Not replicated
  • Service
Memory category
Instances
Own members
7
Inherited members
75
Subclasses
0
Siblings
608

Properties23

Inherited fromObject2

Property categoryData

Inherited fromInstance21

Property categoryBehavior

Property categoryData

Property categoryPermissions

Methods49

Inherited fromObject3
  • Get an event that fires when a given property of the object changes.
    Parameters
    ParameterDescription
    property: string
    The property to connect to.
    Returns
    TypeDescription
    RBXScriptSignal
    A signal that fires whenever the property changes.
  • Object:IsA(className: string): boolean
    Returns true if an object's class matches or inherits from a given class.
    • Custom Lua state
    • Thread safe
    Parameters
    ParameterDescription
    className: string
    The class against which the Object's class will be checked. Case-sensitive.
    Returns
    TypeDescription
    boolean
    Describes whether the Object's class matched or is a subclass of the given class.
  • Object:isA(className: string): boolean
    Deprecated: This deprecated function is a variant of Object:IsA() which should be used instead.
    • Deprecated
    • Custom Lua state
    Parameters
    Parameter
    className: string
    Returns
    Type
    boolean

    Use IsA instead.

Inherited fromInstance39
Defined byEncodingService7
  • EncodingService:Base64Decode(input: buffer): buffer
    Decodes a Base64-encoded buffer into a new buffer containing the original binary data.
    • Thread safe
    Parameters
    ParameterDescription
    input: buffer
    buffer containing Base64 data to decode
    Returns
    TypeDescription
    buffer
    buffer with the decoded result
  • EncodingService:Base64Encode(input: buffer): buffer
    Encodes binary data from a buffer into Base64 format, returning the result as a new buffer.
    • Thread safe
    Parameters
    ParameterDescription
    input: buffer
    buffer containing binary data to encode
    Returns
    TypeDescription
    buffer
    buffer with the encoded result
  • EncodingService:CompressBuffer(input: buffer,algorithm: Enum.CompressionAlgorithm,compressionLevel: number? = 1,): buffer
    Compresses binary buffer data using the specified algorithm and compression level.
    • Thread safe
    Parameters
    ParameterDescription
    input: buffer
    buffer with binary data to compress
    algorithm: Enum.CompressionAlgorithm
    CompressionAlgorithm to use for compression
    compressionLevel: number? = 1
    optional integer compression level to use
    Returns
    TypeDescription
    buffer
    buffer with compressed binary data
  • EncodingService:ComputeBufferHash(input: buffer,algorithm: Enum.HashAlgorithm,): buffer
    Computes a cryptographic hash of a buffer's binary data using the specified algorithm.
    • Thread safe
    Parameters
    ParameterDescription
    input: buffer
    buffer with binary data to compute hash for
    algorithm: Enum.HashAlgorithm
    HashAlgorithm cryptographic hash function
    Returns
    TypeDescription
    buffer
    buffer with the binary data of the hash
  • EncodingService:ComputeStringHash(input: string,algorithm: Enum.HashAlgorithm,): string
    Computes a cryptographic hash of a string using the specified algorithm.
    • Thread safe
    Parameters
    ParameterDescription
    input: string
    string to compute the hash for
    algorithm: Enum.HashAlgorithm
    HashAlgorithm cryptographic hash function
    Returns
    TypeDescription
    string
    String with the binary data of the hash
  • EncodingService:DecompressBuffer(input: buffer,algorithm: Enum.CompressionAlgorithm,): buffer
    Decompresses binary buffer data that was compressed with the specified algorithm.
    • Thread safe
    Parameters
    ParameterDescription
    input: buffer
    buffer with compressed binary data
    algorithm: Enum.CompressionAlgorithm
    CompressionAlgorithm to use for decompression
    Returns
    TypeDescription
    buffer
    buffer with the decompressed binary data
  • EncodingService:GetDecompressedBufferSize(input: buffer,algorithm: Enum.CompressionAlgorithm,): number?
    Returns the expected decompressed size of a compressed buffer, or nil if the size is unknown or invalid.
    • Thread safe
    Parameters
    ParameterDescription
    input: buffer
    buffer with compressed binary data
    algorithm: Enum.CompressionAlgorithm
    CompressionAlgorithm used to compress it
    Returns
    TypeDescription
    number?
    Integer size of the decompressed data or 'nil'

Events10

Inherited fromObject1
Inherited fromInstance9