{
  "classes": [
    {
      "constants": [
        {
          "name": "METHOD_STORE",
          "value": "0",
          "owner": "zip",
          "group_title": "Compression method constants (for comparing EntryInfo.method)",
          "desc": ""
        },
        {
          "name": "METHOD_DEFLATE",
          "value": "8",
          "owner": "zip",
          "desc": ""
        }
      ],
      "types": [
        {
          "lua_type": "type EntryInfo = {\n    name: string,\n    size: number,\n    compressedSize: number,\n    method: number,\n    crc32: number,\n}",
          "name": "EntryInfo",
          "tags": [],
          "source": {
            "path": "",
            "line": 9
          },
          "fields": [
            {
              "lua_type": "name: string",
              "name": "name",
              "desc": ""
            },
            {
              "lua_type": "size: number",
              "name": "size",
              "desc": ""
            },
            {
              "lua_type": "compressedSize: number",
              "name": "compressedSize",
              "desc": ""
            },
            {
              "lua_type": "method: number",
              "name": "method",
              "desc": ""
            },
            {
              "lua_type": "crc32: number",
              "name": "crc32",
              "desc": ""
            }
          ],
          "desc": "Zip file entry metadata returned by `zip.list` and `ZipReader:list`.\n@field name string: the entry filename (directories end with '/')\n@field size number: uncompressed size in bytes\n@field compressedSize number: compressed size in bytes\n@field method number: compression method (compare with `zip.METHOD_*`)\n@field crc32 number: CRC32 checksum of the entry\n"
        },
        {
          "lua_type": "type PackOptions = {\n    method: (\"store\" | \"deflate\")?,\n    level: number?,\n}",
          "name": "PackOptions",
          "tags": [],
          "source": {
            "path": "",
            "line": 17
          },
          "fields": [
            {
              "lua_type": "method: (\"store\" | \"deflate\")?",
              "name": "method",
              "desc": ""
            },
            {
              "lua_type": "level: number?",
              "name": "level",
              "desc": ""
            }
          ],
          "desc": ""
        }
      ],
      "name": "@eryx/compression/zip",
      "tags": [],
      "functions": [
        {
          "source": {
            "path": "",
            "line": 52
          },
          "is_method": false,
          "signature": "zip.open(\n    data: buffer  -- zip archive bytes\n) → (\n    ZipReader  -- reader object \n)",
          "owner": "zip",
          "desc": "Fast magic-byte check. Returns true if the buffer looks like a zip archive.\nChecks for `PK\\x03\\x04` (normal zip) or `PK\\x05\\x06` (empty zip).\n\nOpen a zip archive from an in-memory buffer and return a `ZipReader`.\nThe returned reader pins the provided buffer to avoid copying; call\n`reader:close()` (or let it be GC'd) to release the buffer.",
          "tags": [],
          "name": "open",
          "return_str": "ZipReader",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "ZipReader",
              "desc": "reader object "
            }
          ],
          "params": [
            {
              "lua_type": "buffer",
              "name": "data",
              "desc": "zip archive bytes"
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 61
          },
          "is_method": false,
          "signature": "zip.isZip(\n    data: buffer  -- data to inspect\n) → (\n    boolean  -- true when buffer looks like a zip archive \n)",
          "owner": "zip",
          "desc": "Quick check whether `data` begins with ZIP magic bytes.",
          "tags": [],
          "name": "isZip",
          "return_str": "boolean",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "boolean",
              "desc": "true when buffer looks like a zip archive "
            }
          ],
          "params": [
            {
              "lua_type": "buffer",
              "name": "data",
              "desc": "data to inspect"
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 73
          },
          "is_method": false,
          "signature": "zip.list(\n    data: buffer  -- zip archive bytes\n) → (\n    { EntryInfo }  -- ordered list of entries \n)",
          "owner": "zip",
          "desc": "List all entries in a zip archive without extracting.\nDirectories appear as entries whose name ends with '/'.\nReturn a list of `EntryInfo` for every entry in the given archive.\nThis is a convenience wrapper that opens the archive transiently.",
          "tags": [],
          "name": "list",
          "return_str": "{ EntryInfo }",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "{ EntryInfo }",
              "desc": "ordered list of entries "
            }
          ],
          "params": [
            {
              "lua_type": "buffer",
              "name": "data",
              "desc": "zip archive bytes"
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 84
          },
          "is_method": false,
          "signature": "zip.unpack(\n    data: buffer  -- zip archive bytes\n) → (\n    { [string]: buffer }  -- map of filename -> contents \n)",
          "owner": "zip",
          "desc": "Extract all files from a zip into a name->buffer table.\nDirectory entries are skipped.\nUnpack all non-directory entries into a name -> buffer table.",
          "tags": [],
          "name": "unpack",
          "return_str": "{ [string]: buffer }",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "{ [string]: buffer }",
              "desc": "map of filename -> contents "
            }
          ],
          "params": [
            {
              "lua_type": "buffer",
              "name": "data",
              "desc": "zip archive bytes"
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 96
          },
          "is_method": false,
          "signature": "zip.read(\n    data: buffer,  -- zip archive bytes\n    name: string  -- entry filename to read (case-sensitive)\n) → (\n    buffer?  -- entry contents or nil if not found \n)",
          "owner": "zip",
          "desc": "Read a single named entry from a zip. Returns nil if not found.\nName is matched case-sensitively.\nThis opens the archive, locates the entry, reads it, and closes the archive.",
          "tags": [],
          "name": "read",
          "return_str": "buffer?",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "buffer?",
              "desc": "entry contents or nil if not found "
            }
          ],
          "params": [
            {
              "lua_type": "buffer",
              "name": "data",
              "desc": "zip archive bytes"
            },
            {
              "lua_type": "string",
              "name": "name",
              "desc": "entry filename to read (case-sensitive)"
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 109
          },
          "is_method": false,
          "signature": "zip.pack(\n    files: { [string]: buffer },  -- map of filenames to data\n    options: PackOptions?\n) → (\n    buffer  -- the generated zip archive \n)",
          "owner": "zip",
          "desc": "Pack a name->buffer table into a zip archive returned as a buffer.\noptions.method: \"deflate\" (default) or \"store\" (no compression)\noptions.level: 1 (fastest) - 9 (best), -1 = default\nCreate a ZIP archive from a map of filename -> buffer.\n@param options? PackOptions -- optional packing options",
          "tags": [],
          "name": "pack",
          "return_str": "buffer",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "buffer",
              "desc": "the generated zip archive "
            }
          ],
          "params": [
            {
              "lua_type": "{ [string]: buffer }",
              "name": "files",
              "desc": "map of filenames to data"
            },
            {
              "lua_type": "PackOptions?",
              "name": "options",
              "desc": ""
            }
          ]
        }
      ],
      "properties": [],
      "source": {
        "path": "",
        "line": 0
      },
      "desc": ""
    },
    {
      "is_primary_export": false,
      "source": {
        "path": "",
        "line": 22
      },
      "tags": [],
      "properties": [],
      "desc": "",
      "name": "ZipReader",
      "functions": [
        {
          "source": {
            "path": "",
            "line": 27
          },
          "is_method": true,
          "signature": "ZipReader:List() → (\n    { EntryInfo }  -- list of entries in archive \n)",
          "desc": "List entries in the opened archive. Directories have names ending with '/'.",
          "tags": [],
          "name": "List",
          "return_str": "{ EntryInfo }",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "{ EntryInfo }",
              "desc": "list of entries in archive "
            }
          ],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 34
          },
          "is_method": true,
          "signature": "ZipReader:Read(\n    name: string  -- entry filename (case-sensitive)\n) → (\n    buffer?  -- the entry contents or nil \n)",
          "desc": "Read a named entry from the opened archive. Returns nil if not found.",
          "tags": [],
          "name": "Read",
          "return_str": "buffer?",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "buffer?",
              "desc": "the entry contents or nil "
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "name",
              "desc": "entry filename (case-sensitive)"
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 37
          },
          "is_method": true,
          "signature": "ZipReader:Close() → ()",
          "desc": "Close the reader and release any pinned buffer. Safe to call multiple times.",
          "tags": [],
          "name": "Close",
          "return_str": "()",
          "function_type": "Method",
          "returns": [],
          "params": []
        }
      ],
      "metamethods": [],
      "types": []
    }
  ]
}