{
  "classes": [
    {
      "constants": [],
      "types": [],
      "name": "@eryx/http/body",
      "tags": [],
      "functions": [
        {
          "source": {
            "path": "",
            "line": 51
          },
          "is_method": false,
          "signature": "body.decompress(\n    body: string,  -- The encoded response body bytes.\n    encoding: string?  -- The `Content-Encoding` header value.\n) → (\n    string  -- The decoded body bytes. \n)",
          "owner": "body",
          "desc": "Decompresses an HTTP response body based on a `Content-Encoding`\nheader.\n\nSupports stacked encodings such as `\"gzip, br\"`, applying them in the\nreverse order required by HTTP.\n",
          "tags": [],
          "name": "decompress",
          "return_str": "string",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "string",
              "desc": "The decoded body bytes. "
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "body",
              "desc": "The encoded response body bytes."
            },
            {
              "lua_type": "string?",
              "name": "encoding",
              "desc": "The `Content-Encoding` header value."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 121
          },
          "is_method": false,
          "signature": "body.createDecoder(\n    encoding: string?  -- The `Content-Encoding` header value.\n) → (\n    StreamDecoder?  -- A decoder object, or `nil` when no decoding is required. \n)",
          "owner": "body",
          "desc": "Creates an incremental decoder for a `Content-Encoding` header value.\n\nThis is used by streamed HTTP responses so callers can consume\ndecompressed data incrementally instead of buffering the whole encoded\nbody first.\n",
          "tags": [],
          "name": "createDecoder",
          "return_str": "StreamDecoder?",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "StreamDecoder?",
              "desc": "A decoder object, or `nil` when no decoding is required. "
            }
          ],
          "params": [
            {
              "lua_type": "string?",
              "name": "encoding",
              "desc": "The `Content-Encoding` header value."
            }
          ]
        }
      ],
      "properties": [],
      "source": {
        "path": "",
        "line": 0
      },
      "desc": ""
    },
    {
      "is_primary_export": false,
      "source": {
        "path": "",
        "line": 11
      },
      "tags": [],
      "properties": [],
      "desc": "An incremental HTTP content decoder returned by\n[[body.createDecoder]].\n",
      "name": "StreamDecoder",
      "functions": [
        {
          "source": {
            "path": "",
            "line": 12
          },
          "is_method": true,
          "signature": "StreamDecoder:write(data: string) → string",
          "desc": "",
          "tags": [],
          "name": "write",
          "return_str": "string",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "string",
              "desc": ""
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "data",
              "desc": ""
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 13
          },
          "is_method": true,
          "signature": "StreamDecoder:close() → ()",
          "desc": "",
          "tags": [],
          "name": "close",
          "return_str": "()",
          "function_type": "Method",
          "returns": [],
          "params": []
        }
      ],
      "metamethods": [],
      "types": []
    }
  ]
}