repopage.c File Reference

#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <assert.h>
#include <fcntl.h>
#include <time.h>
#include "repo.h"
#include "repopage.h"

Go to the source code of this file.

Defines

#define _XOPEN_SOURCE   500
#define BLOCK_SIZE   (65536*1)
#define HS   (65536)
#define SOLV_ERROR_EOF   3
#define SOLV_ERROR_CORRUPT   6

Typedefs

typedef __uint16_t Ref

Functions

static unsigned int compress_buf (const unsigned char *in, unsigned int in_len, unsigned char *out, unsigned int out_len)
static unsigned int unchecked_decompress_buf (const unsigned char *in, unsigned int in_len, unsigned char *out, unsigned int out_len __attribute__((unused)))
void repopagestore_init (Repopagestore *store)
void repopagestore_free (Repopagestore *store)
unsigned char * repopagestore_load_page_range (Repopagestore *store, unsigned int pstart, unsigned int pend)
unsigned int repopagestore_compress_page (unsigned char *page, unsigned int len, unsigned char *cpage, unsigned int max)
static unsigned int read_u32 (FILE *fp)
int repopagestore_read_or_setup_pages (Repopagestore *store, FILE *fp, unsigned int pagesz, unsigned int blobsz)
void repopagestore_disable_paging (Repopagestore *store)


Define Documentation

#define _XOPEN_SOURCE   500

Definition at line 21 of file repopage.c.

#define BLOCK_SIZE   (65536*1)

Definition at line 37 of file repopage.c.

Referenced by compress_buf().

#define HS   (65536)

Referenced by compress_buf().

#define SOLV_ERROR_EOF   3

Definition at line 739 of file repopage.c.

#define SOLV_ERROR_CORRUPT   6

Definition at line 740 of file repopage.c.


Typedef Documentation

typedef __uint16_t Ref

Definition at line 39 of file repopage.c.


Function Documentation

static unsigned int compress_buf ( const unsigned char *  in,
unsigned int  in_len,
unsigned char *  out,
unsigned int  out_len 
) [static]

Definition at line 90 of file repopage.c.

References BLOCK_SIZE, and HS.

static unsigned int unchecked_decompress_buf ( const unsigned char *  in,
unsigned int  in_len,
unsigned char *  out,
unsigned int out_len   __attribute__(unused) 
) [static]

Definition at line 405 of file repopage.c.

void repopagestore_init ( Repopagestore store  ) 

Definition at line 554 of file repopage.c.

References _Repopagestore::pagefd.

Referenced by repo_add_solv_flags(), and repodata_initdata().

void repopagestore_free ( Repopagestore store  ) 

unsigned char* repopagestore_load_page_range ( Repopagestore store,
unsigned int  pstart,
unsigned int  pend 
)

unsigned int repopagestore_compress_page ( unsigned char *  page,
unsigned int  len,
unsigned char *  cpage,
unsigned int  max 
)

Definition at line 734 of file repopage.c.

References compress_buf().

static unsigned int read_u32 ( FILE *  fp  )  [inline, static]

Definition at line 743 of file repopage.c.

Referenced by repopagestore_read_or_setup_pages().

int repopagestore_read_or_setup_pages ( Repopagestore store,
FILE *  fp,
unsigned int  pagesz,
unsigned int  blobsz 
)

void repopagestore_disable_paging ( Repopagestore store  ) 

Definition at line 850 of file repopage.c.

References _Repopagestore::num_pages, and repopagestore_load_page_range().

Referenced by repodata_disable_paging().


doxygen