IDZEBRA 2.2.11
stream.c File Reference
#include <stdio.h>
#include <assert.h>
#include <fcntl.h>
#include "index.h"

Go to the source code of this file.

Data Structures

struct  zebra_mem_control
struct  zebra_ext_control

Functions

static off_t zebra_mem_seek (struct ZebraRecStream *s, off_t offset)
static off_t zebra_mem_tell (struct ZebraRecStream *s)
static int zebra_mem_read (struct ZebraRecStream *s, char *buf, size_t count)
static off_t zebra_mem_end (struct ZebraRecStream *s, off_t *offset)
static void zebra_mem_destroy (struct ZebraRecStream *s)
static int zebra_ext_read (struct ZebraRecStream *s, char *buf, size_t count)
static off_t zebra_ext_seek (struct ZebraRecStream *s, off_t offset)
static off_t zebra_ext_tell (struct ZebraRecStream *s)
static void zebra_ext_destroy (struct ZebraRecStream *s)
static off_t zebra_ext_end (struct ZebraRecStream *s, off_t *offset)
void zebra_create_stream_mem (struct ZebraRecStream *stream, const char *buf, size_t sz)
void zebra_create_stream_fd (struct ZebraRecStream *stream, int fd, off_t start_offset)

Function Documentation

◆ zebra_create_stream_fd()

◆ zebra_create_stream_mem()

◆ zebra_ext_destroy()

void zebra_ext_destroy ( struct ZebraRecStream * s)
static

Definition at line 106 of file stream.c.

References zebra_ext_control::fd, and ZebraRecStream::fh.

Referenced by zebra_create_stream_fd().

◆ zebra_ext_end()

off_t zebra_ext_end ( struct ZebraRecStream * s,
off_t * offset )
static

Definition at line 114 of file stream.c.

References ZebraRecStream::fh, and zebra_ext_control::offset_end.

Referenced by zebra_create_stream_fd().

◆ zebra_ext_read()

int zebra_ext_read ( struct ZebraRecStream * s,
char * buf,
size_t count )
static

Definition at line 88 of file stream.c.

References zebra_ext_control::fd, and ZebraRecStream::fh.

Referenced by zebra_create_stream_fd().

◆ zebra_ext_seek()

off_t zebra_ext_seek ( struct ZebraRecStream * s,
off_t offset )
static

◆ zebra_ext_tell()

off_t zebra_ext_tell ( struct ZebraRecStream * s)
static

◆ zebra_mem_destroy()

void zebra_mem_destroy ( struct ZebraRecStream * s)
static

Definition at line 82 of file stream.c.

References ZebraRecStream::fh.

Referenced by zebra_create_stream_mem().

◆ zebra_mem_end()

off_t zebra_mem_end ( struct ZebraRecStream * s,
off_t * offset )
static

Definition at line 74 of file stream.c.

References ZebraRecStream::fh, and zebra_mem_control::offset_end.

Referenced by zebra_create_stream_mem().

◆ zebra_mem_read()

int zebra_mem_read ( struct ZebraRecStream * s,
char * buf,
size_t count )
static

◆ zebra_mem_seek()

off_t zebra_mem_seek ( struct ZebraRecStream * s,
off_t offset )
static

Definition at line 50 of file stream.c.

References ZebraRecStream::fh, and zebra_mem_control::record_int_pos.

Referenced by zebra_create_stream_mem().

◆ zebra_mem_tell()

off_t zebra_mem_tell ( struct ZebraRecStream * s)
static

Definition at line 56 of file stream.c.

References ZebraRecStream::fh, and zebra_mem_control::record_int_pos.

Referenced by zebra_create_stream_mem().