# lua/lzio.c File Reference

`#include <string.h>`
`#include "lua.h"`
`#include "llimits.h"`
`#include "lmem.h"`
`#include "lstate.h"`
`#include "lzio.h"`

Include dependency graph for lzio.c:

Go to the source code of this file.

## Defines
#define | lzio_c
#define | LUA_CORE
## Functions
int | luaZ_fill (ZIO *z)
int | luaZ_lookahead (ZIO *z)
void | luaZ_init (lua_State *L, ZIO *z, lua_Reader reader, void *data)
size_t | luaZ_read (ZIO *z, void *b, size_t n)
char * | luaZ_openspace (lua_State *L, Mbuffer *buff, size_t n)

## Define Documentation

#define LUA_CORE

Definition at line 11 of file lzio.c.

#define lzio_c

Definition at line 10 of file lzio.c.

## Function Documentation

int luaZ_fill | ( | ZIO * | z | ) |

Definition at line 21 of file lzio.c.

References char2int, Zio::data, EOZ, Zio::L, lua_lock, lua_unlock, Zio::n, Zio::p, and Zio::reader.

Referenced by luaZ_lookahead().

void luaZ_init | ( | lua_State * | L,
|  | ZIO * | z,
|  | lua_Reader | reader,
|  | void * | data |
| ) |  |  |

Definition at line 48 of file lzio.c.

References Zio::data, Zio::L, Zio::n, Zio::p, and Zio::reader.

Referenced by lua_load().

int luaZ_lookahead | ( | ZIO * | z | ) |

Definition at line 35 of file lzio.c.

References char2int, EOZ, luaZ_fill(), Zio::n, and Zio::p.

Referenced by f_parser(), and luaZ_read().

char* luaZ_openspace | ( | lua_State * | L,
|  | Mbuffer * | buff,
|  | size_t | n |
| ) |  |  |

Definition at line 74 of file lzio.c.

References Mbuffer::buffer, Mbuffer::buffsize, LUA_MINBUFFER, and luaZ_resizebuffer.

Referenced by LoadString(), and luaV_concat().

size_t luaZ_read | ( | ZIO * | z,
|  | void * | b,
|  | size_t | n |
| ) |  |  |

Definition at line 58 of file lzio.c.

References EOZ, luaZ_lookahead(), Zio::n, and Zio::p.

Referenced by LoadBlock().