Eneboo - Documentación para desarrolladores
Clases | 'defines' | 'typedefs' | Funciones | Variables
Referencia del Archivo src/libpq/include/utils/pg_lzcompress.h

Ir al código fuente de este archivo.

Clases

struct  PGLZ_Header
struct  PGLZ_Strategy
struct  PGLZ_DecompState

'defines'

#define PGLZ_MAX_OUTPUT(_dlen)
#define PGLZ_RAW_SIZE(_lzdata)   ((_lzdata)->rawsize)
#define PGLZ_IS_COMPRESSED(_lzdata)
#define PGLZ_RAW_DATA(_lzdata)
#define pglz_decomp_getchar(_ds)   ((*((_ds)->next_char))((_ds)))
#define pglz_decomp_init(_ds, _lz)
#define pglz_decomp_end(_ds)

'typedefs'

typedef struct PGLZ_Header PGLZ_Header
typedef struct PGLZ_Strategy PGLZ_Strategy
typedef struct PGLZ_DecompState PGLZ_DecompState

Funciones

int pglz_compress (char *source, int32 slen, PGLZ_Header *dest, PGLZ_Strategy *strategy)
int pglz_decompress (PGLZ_Header *source, char *dest)
int pglz_get_next_decomp_char_from_lzdata (PGLZ_DecompState *dstate)
int pglz_get_next_decomp_char_from_plain (PGLZ_DecompState *dstate)

Variables

PGLZ_StrategyPGLZ_strategy_default
PGLZ_StrategyPGLZ_strategy_always
PGLZ_StrategyPGLZ_strategy_never

Documentación de los 'defines'

#define pglz_decomp_end (   _ds)
Valor:
do {                                                                                    \
                if ((_ds)->temp_buf != NULL)                                                                            \
                        pfree((void *)((_ds)->temp_buf));                                                               \
        } while (0)
#define pglz_decomp_getchar (   _ds)    ((*((_ds)->next_char))((_ds)))
#define pglz_decomp_init (   _ds,
  _lz 
)
Valor:
do {                                                                            \
                (_ds)->cp_in            = ((unsigned char *)(_lz))                                              \
                                                                                        + sizeof(PGLZ_Header);                  \
                (_ds)->cp_end           = (_ds)->cp_in + (_lz)->varsize                                 \
                                                                                        - sizeof(PGLZ_Header);                  \
                if (PGLZ_IS_COMPRESSED((_lz))) {                                                                        \
                        (_ds)->temp_buf         = (unsigned char *)                                                     \
                                                                                palloc(PGLZ_RAW_SIZE((_lz)));           \
                        (_ds)->cp_out           = (_ds)->temp_buf;                                                      \
                        (_ds)->next_char        = pglz_get_next_decomp_char_from_lzdata;        \
                        (_ds)->tocopy           = 0;                                                                            \
                        (_ds)->ctrl_count       = 0;                                                                            \
                } else {                                                                                                                        \
                        (_ds)->temp_buf         = NULL;                                                                         \
                        (_ds)->next_char        = pglz_get_next_decomp_char_from_plain;         \
                }                                                                                                                                       \
        } while (0)
#define PGLZ_IS_COMPRESSED (   _lzdata)
Valor:
((_lzdata)->varsize !=                          \
e                                                                                (_lzdata)->rawsize +                   e       \
                                                                                                                sizeof(PGLZ_Header))
#define PGLZ_MAX_OUTPUT (   _dlen)
Valor:
((_dlen) + (((_dlen) | 0x07) >> 3)      \
                                                                                                         + sizeof(PGLZ_Header))
#define PGLZ_RAW_DATA (   _lzdata)
Valor:
(((char *)(_lzdata)) +                          \
                                                                                                                sizeof(PGLZ_Header))
#define PGLZ_RAW_SIZE (   _lzdata)    ((_lzdata)->rawsize)

Documentación de los 'typedefs'

typedef struct PGLZ_Header PGLZ_Header
typedef struct PGLZ_Strategy PGLZ_Strategy

Documentación de las funciones

int pglz_compress ( char *  source,
int32  slen,
PGLZ_Header dest,
PGLZ_Strategy strategy 
)
int pglz_decompress ( PGLZ_Header source,
char *  dest 
)
int pglz_get_next_decomp_char_from_lzdata ( PGLZ_DecompState dstate)
int pglz_get_next_decomp_char_from_plain ( PGLZ_DecompState dstate)

Documentación de las variables

 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'