> ## Documentation Index
> Fetch the complete documentation index at: https://docs.projectreal.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# lz4compress

> Lua string byte degerlerini LZ4 block compression ile sikistirir ve raw compressed bytes degerlerini Lua string olarak dondurur.

<div className="real-function-page">
  ```lua theme={null}
  lz4compress(data: string): string
  ```

  ## Aliaslar

  * `crypt.lz4compress`
  * `crypt.lz4.compress`
  * `lz4.compress`

  ## Argümanlar

  <ParamField path={"data"} type={"string"} required>
    LZ4 block compression icine aktarilan Lua string byte degerleri.
  </ParamField>

  ## Dönüşler

  <ResponseField name={"compressed"} type={"string"}>
    Lua string olarak dondurulen raw compressed bytes. original size output icinde saklanmaz.
  </ResponseField>

  ## Örnek

  Lua string byte degerlerini sikistir ve original size vererek geri yukle.

  ```lua theme={null}
  local source = string.rep("Real Docs ", 100)
  local compressed = lz4compress(source)
  local restored = lz4decompress(compressed, #source)

  print(#source, #compressed, restored == source)
  ```
</div>
