Biomedical Image Analysis Library
The Biomedical Image Analysis Library is a poweful tool for developers, physicians, researchers, engineers, and so on.
zran.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "zlib.h"
Include dependency graph for zran.c:

Go to the source code of this file.

Classes

struct  point
 
struct  access
 

Macros

#define local   static
 
#define SPAN   1048576L /* desired distance between access points */
 
#define WINSIZE   32768U /* sliding window size */
 
#define CHUNK   16384 /* file input buffer size */
 

Functions

static void free_index (struct access *index)
 
static struct accessaddpoint (struct access *index, int bits, off_t in, off_t out, unsigned left, unsigned char *window)
 
static int build_index (FILE *in, off_t span, struct access **built)
 
static int extract (FILE *in, struct access *index, off_t offset, unsigned char *buf, int len)
 
int main (int argc, char **argv)
 

Class Documentation

struct point

Definition at line 67 of file zran.c.

Collaboration diagram for point:
Collaboration graph
Class Members
int bits
off_t in
off_t out
unsigned char window[32768U]
struct access

Definition at line 75 of file zran.c.

Collaboration diagram for access:
Collaboration graph
Class Members
int have
struct point * list
int size

Macro Definition Documentation

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

Definition at line 64 of file zran.c.

#define local   static

Definition at line 60 of file zran.c.

#define SPAN   1048576L /* desired distance between access points */

Definition at line 62 of file zran.c.

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

Definition at line 63 of file zran.c.

Function Documentation

static struct access* addpoint ( struct access index,
int  bits,
off_t  in,
off_t  out,
unsigned  left,
unsigned char *  window 
)
static

Definition at line 92 of file zran.c.

static int build_index ( FILE *  in,
off_t  span,
struct access **  built 
)
static

Definition at line 144 of file zran.c.

static int extract ( FILE *  in,
struct access index,
off_t  offset,
unsigned char *  buf,
int  len 
)
static

Definition at line 249 of file zran.c.

static void free_index ( struct access index)
static

Definition at line 82 of file zran.c.

int main ( int  argc,
char **  argv 
)

Definition at line 354 of file zran.c.