Class StiPacker

Hierarchy

  • StiPacker

Index

Properties

Static allowPacking

allowPacking: boolean = true

Methods

Static isPacked

  • isPacked(bytes: number[]): boolean
  • Parameters

    • bytes: number[]

    Returns boolean

Static pack

  • pack(bytes: number[]): number[]
  • Parameters

    • bytes: number[]

    Returns number[]

Static packAndEncryptToString

  • packAndEncryptToString(data: number[] | string): string
  • Parameters

    • data: number[] | string

    Returns string

Static packToBytes

  • packToBytes(str: string, allowPacking?: boolean): number[]
  • Parameters

    • str: string
    • Default value allowPacking: boolean = true

    Returns number[]

Static packToString

  • packToString(bytes: number[]): string
  • Parameters

    • bytes: number[]

    Returns string

Static unpack

  • unpack<B>(bytes: number[], returnString: B): B extends true ? string : number[]
  • Type parameters

    • B: boolean

    Parameters

    • bytes: number[]
    • returnString: B

    Returns B extends true ? string : number[]

Static unpack2

  • unpack2(bytes: number[]): string
  • Parameters

    • bytes: number[]

    Returns string

Static unpackAndDecrypt

  • unpackAndDecrypt<B>(str: string, returnString: B): B extends true ? string : number[]
  • Type parameters

    • B: boolean

    Parameters

    • str: string
    • returnString: B

    Returns B extends true ? string : number[]

Static unpackFromString

  • unpackFromString(str: string): number[]
  • Parameters

    • str: string

    Returns number[]

Static unpackToString

  • unpackToString(bytes: number[]): string
  • Parameters

    • bytes: number[]

    Returns string

Generated using TypeDoc