Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#include "zlib.h"
Go to the source code of this file.
Data Structures | |
struct | file |
Macros | |
#define | local static |
#define | LGCHUNK 14 |
#define | CHUNK (1U << LGCHUNK) |
#define | DSIZE 32768U |
#define | read1(in) |
Functions | |
void | bye (char *msg1, char *msg2) |
unsigned | gcd (unsigned a, unsigned b) |
void | rotate (unsigned char *list, unsigned len, unsigned rot) |
int | readin (file *in) |
int | readmore (file *in) |
void | skip (file *in, unsigned n) |
unsigned long | read4 (file *in) |
void | gzheader (file *in) |
int | gzscan (char *name, z_stream *strm, int level) |
void | gztack (char *name, int gd, z_stream *strm, int last) |
int | main (int argc, char **argv) |
Definition at line 89 of file gzappend.c.
#define DSIZE 32768U |
Definition at line 90 of file gzappend.c.
#define LGCHUNK 14 |
Definition at line 88 of file gzappend.c.
#define local static |
Definition at line 87 of file gzappend.c.
#define read1 | ( | in | ) |
void bye | ( | char * | msg1, |
char * | msg2 | ||
) |
Definition at line 93 of file gzappend.c.
Referenced by gzheader(), gzscan(), gztack(), main(), readin(), readmore(), and skip().
unsigned gcd | ( | unsigned | a, |
unsigned | b | ||
) |
Definition at line 102 of file gzappend.c.
Referenced by rb_int_fdiv_double(), and rotate().
void gzheader | ( | file * | in | ) |
Definition at line 259 of file gzappend.c.
References z_stream_s::adler, z_stream_s::avail_in, z_stream_s::avail_out, file::buf, bye(), CHUNK, crc32(), z_stream_s::data_type, deflateInit2, deflatePrime(), deflateSetDictionary(), DSIZE, file::fd, free, gzheader(), inflate(), inflateEnd(), inflateInit2, L, file::left, LGCHUNK, malloc, name, file::name, file::next, z_stream_s::next_in, z_stream_s::next_out, NULL, off_t, z_stream_s::opaque, read(), read4(), readin(), readmore(), rotate(), SEEK_CUR, SEEK_SET, file::size, tot, z_stream_s::total_in, z_stream_s::total_out, write(), Z_BLOCK, Z_DATA_ERROR, Z_DEFAULT_STRATEGY, Z_DEFLATED, Z_MEM_ERROR, Z_NULL, Z_OK, Z_STREAM_END, Z_STREAM_ERROR, z_stream_s::zalloc, and z_stream_s::zfree.
Referenced by main().
Definition at line 388 of file gzappend.c.
References z_stream_s::adler, z_stream_s::avail_in, z_stream_s::avail_out, bye(), CHUNK, crc32(), deflate(), deflateEnd(), free, in(), last, len, malloc, name, z_stream_s::next_in, z_stream_s::next_out, NULL, out, read(), z_stream_s::total_in, write(), Z_FINISH, Z_NO_FLUSH, and Z_STREAM_END.
Referenced by main().
Definition at line 466 of file gzappend.c.
References argc, argv, bye(), gzscan(), gztack(), NULL, and Z_DEFAULT_COMPRESSION.
Definition at line 180 of file gzappend.c.
References bye(), in(), len, and read().
Referenced by gzscan(), and readmore().
void rotate | ( | unsigned char * | list, |
unsigned | len, | ||
unsigned | rot | ||
) |
void skip | ( | file * | in, |
unsigned | n | ||
) |
Definition at line 202 of file gzappend.c.
References bye(), in(), off_t, readmore(), and SEEK_CUR.
Referenced by bskip(), deflate_index_extract(), gzheader(), and main().