Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)
Data Structures | Macros | Functions
zran.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "zlib.h"
#include "zran.h"

Go to the source code of this file.

Data Structures

struct  point
 

Macros

#define WINSIZE   32768U /* sliding window size */
 
#define CHUNK   16384 /* file input buffer size */
 

Functions

void deflate_index_free (struct deflate_index *index)
 
int deflate_index_build (FILE *in, off_t span, struct deflate_index **built)
 
int deflate_index_extract (FILE *in, struct deflate_index *index, off_t offset, unsigned char *buf, int len)
 

Macro Definition Documentation

◆ CHUNK

#define CHUNK   16384 /* file input buffer size */

Definition at line 65 of file zran.c.

◆ WINSIZE

#define WINSIZE   32768U /* sliding window size */

Definition at line 64 of file zran.c.

Function Documentation

◆ deflate_index_build()

int deflate_index_build ( FILE in,
off_t  span,
struct deflate_index **  built 
)

◆ deflate_index_extract()

int deflate_index_extract ( FILE in,
struct deflate_index index,
off_t  offset,
unsigned char *  buf,
int  len 
)

◆ deflate_index_free()

void deflate_index_free ( struct deflate_index index)

Definition at line 76 of file zran.c.

References free, deflate_index::list, and NULL.

Referenced by deflate_index_build().