|
PostgreSQL Source Code git master
|
#include "pg_backup_archiver.h"

Go to the source code of this file.
Data Structures | |
| struct | CompressorState |
| struct | CompressFileHandle |
Macros | |
| #define | DEFAULT_IO_BUFFER_SIZE (128 * 1024) |
Typedefs | |
| typedef void(* | WriteFunc) (ArchiveHandle *AH, const char *buf, size_t len) |
| typedef size_t(* | ReadFunc) (ArchiveHandle *AH, char **buf, size_t *buflen) |
| typedef struct CompressorState | CompressorState |
| typedef struct CompressFileHandle | CompressFileHandle |
Functions | |
| char * | supports_compression (const pg_compress_specification compression_spec) |
| CompressorState * | AllocateCompressor (const pg_compress_specification compression_spec, ReadFunc readF, WriteFunc writeF) |
| void | EndCompressor (ArchiveHandle *AH, CompressorState *cs) |
| CompressFileHandle * | InitCompressFileHandle (const pg_compress_specification compression_spec) |
| CompressFileHandle * | InitDiscoverCompressFileHandle (const char *path, const char *mode) |
| bool | EndCompressFileHandle (CompressFileHandle *CFH) |
| #define DEFAULT_IO_BUFFER_SIZE (128 * 1024) |
Definition at line 27 of file compress_io.h.
| typedef struct CompressFileHandle CompressFileHandle |
Definition at line 98 of file compress_io.h.
| typedef struct CompressorState CompressorState |
Definition at line 49 of file compress_io.h.
| typedef size_t(* ReadFunc) (ArchiveHandle *AH, char **buf, size_t *buflen) |
Definition at line 47 of file compress_io.h.
| typedef void(* WriteFunc) (ArchiveHandle *AH, const char *buf, size_t len) |
Definition at line 34 of file compress_io.h.
| CompressorState * AllocateCompressor | ( | const pg_compress_specification | compression_spec, |
| ReadFunc | readF, | ||
| WriteFunc | writeF | ||
| ) |
Definition at line 123 of file compress_io.c.
References pg_compress_specification::algorithm, InitCompressorGzip(), InitCompressorLZ4(), InitCompressorNone(), InitCompressorZstd(), PG_COMPRESSION_GZIP, PG_COMPRESSION_LZ4, PG_COMPRESSION_NONE, PG_COMPRESSION_ZSTD, pg_malloc0(), CompressorState::readF, and CompressorState::writeF.
Referenced by _PrintData(), _StartData(), and _StartLO().
| bool EndCompressFileHandle | ( | CompressFileHandle * | CFH | ) |
Definition at line 289 of file compress_io.c.
References CompressFileHandle::close_func, free_keep_errno(), and CompressFileHandle::private_data.
Referenced by _CloseArchive(), _EndData(), _EndLO(), _EndLOs(), _LoadLOs(), _PrintFileData(), CloseArchive(), InitArchiveFmt_Directory(), and RestoreOutput().
| void EndCompressor | ( | ArchiveHandle * | AH, |
| CompressorState * | cs | ||
| ) |
Definition at line 148 of file compress_io.c.
References CompressorState::end, and pg_free().
Referenced by _EndData(), _EndLO(), and _PrintData().
| CompressFileHandle * InitCompressFileHandle | ( | const pg_compress_specification | compression_spec | ) |
Definition at line 194 of file compress_io.c.
References pg_compress_specification::algorithm, InitCompressFileHandleGzip(), InitCompressFileHandleLZ4(), InitCompressFileHandleNone(), InitCompressFileHandleZstd(), PG_COMPRESSION_GZIP, PG_COMPRESSION_LZ4, PG_COMPRESSION_NONE, PG_COMPRESSION_ZSTD, and pg_malloc0().
Referenced by _allocAH(), _CloseArchive(), _StartData(), _StartLO(), _StartLOs(), InitDiscoverCompressFileHandle(), and SetOutput().
| CompressFileHandle * InitDiscoverCompressFileHandle | ( | const char * | path, |
| const char * | mode | ||
| ) |
Definition at line 240 of file compress_io.c.
References pg_compress_specification::algorithm, Assert(), check_compressed_file(), free_keep_errno(), hasSuffix(), InitCompressFileHandle(), mode, CompressFileHandle::open_func, PG_BINARY_R, PG_COMPRESSION_GZIP, PG_COMPRESSION_LZ4, PG_COMPRESSION_NONE, PG_COMPRESSION_ZSTD, pg_strdup(), and stat.
Referenced by _LoadLOs(), _PrintFileData(), and InitArchiveFmt_Directory().
| char * supports_compression | ( | const pg_compress_specification | compression_spec | ) |
Definition at line 87 of file compress_io.c.
References _, pg_compress_specification::algorithm, get_compress_algorithm_name(), PG_COMPRESSION_GZIP, PG_COMPRESSION_LZ4, PG_COMPRESSION_NONE, PG_COMPRESSION_ZSTD, and psprintf().
Referenced by main(), ReadHead(), and RestoreArchive().