|
wavelength 1.0.0
|
Go to the source code of this file.
Functions | |
| void | GzipInit () |
| Mark the gzip module initialized. | |
| int | GzipFdToRam (int nFile, void *pDest, int bCompress) |
| Decompress or compress the gzip input to a buffer. | |
| int | GzipDecompressRamToRam (const void *pSource, int nSourceLength, void *pDest) |
| Inflate a gzip member that is already in memory, naming the input (in-memory). | |
| int | GzipSizeDecompressed (const void *pSource, int nSourceLength) |
| Report the uncompressed length a gzip member in memory records in its trailer. | |
| int | GzipCompressRamToRam (const void *pSource, int nSourceLength, void *pDest) |
| Deflate bytes in memory into a gzip member, naming the input (in-memory). | |
| void | GzipFileName (const char *pszFile, int bGenerated, char *pszOut) |
| Write the name of the compressed copy of a file. | |
| void GzipInit | ( | ) |
Mark the gzip module initialized.
Only GzipInit() reads the flag.
| int GzipFdToRam | ( | int | nFile, |
| void * | pDest, | ||
| int | bCompress ) |
Decompress or compress the gzip input to a buffer.
Decompression reads the member header and inflates the data without checking the trailer. Compression writes a whole member. The file is not closed.
The name is inferred.
| nFile | The file to read, or -1 for the memory source. |
| pDest | The destination. |
| bCompress | Non-zero to compress, zero to decompress. |
| int GzipDecompressRamToRam | ( | const void * | pSource, |
| int | nSourceLength, | ||
| void * | pDest ) |
Inflate a gzip member that is already in memory, naming the input (in-memory).
The source and destination windows may overlap, and every caller in the async layer relies on the overlap. The stored bytes sit against the end of the destination, and the inflate runs forward over the whole destination.
| pSource | The stored bytes. |
| nSourceLength | The number of bytes the inflate may read. |
| pDest | The destination. |
| int GzipSizeDecompressed | ( | const void * | pSource, |
| int | nSourceLength ) |
Report the uncompressed length a gzip member in memory records in its trailer.
The length is the last four bytes of the member, read without regard to alignment.
| pSource | The stored bytes. |
| nSourceLength | The number of stored bytes. |
| int GzipCompressRamToRam | ( | const void * | pSource, |
| int | nSourceLength, | ||
| void * | pDest ) |
Deflate bytes in memory into a gzip member, naming the input (in-memory).
The name is inferred.
| pSource | The bytes. |
| nSourceLength | The number of bytes. |
| pDest | The destination, which may be the source. |
| void GzipFileName | ( | const char * | pszFile, |
| int | bGenerated, | ||
| char * | pszOut ) |
Write the name of the compressed copy of a file.
The name is inferred.
| pszFile | The file. |
| bGenerated | Non-zero for the copy under gen beside the file, <dir>/gen/<base>.<ext>.gz. Otherwise the copy is the file with .gz appended. |
| pszOut | Receives the name. |