You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pixz/pixz.h

47 lines
780 B
C

15 years ago
#include <lzma.h>
#include <stdbool.h>
15 years ago
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
15 years ago
#pragma mark DEFINES
15 years ago
#define CHECK LZMA_CHECK_CRC32
#define MEMLIMIT (64L * 1024 * 1024 * 1024) // crazy high
15 years ago
#define CHUNKSIZE 4096
#define BLOCKSIZE (1024 * 1024)
15 years ago
#pragma mark TYPES
15 years ago
struct file_index_t {
char *name;
off_t offset;
struct file_index_t *next;
};
typedef struct file_index_t file_index_t;
#pragma mark GLOBALS
FILE *gInFile;
lzma_stream gStream;
extern lzma_index *gIndex;
extern file_index_t *gFileIndex, *gLastFile;
#pragma mark FUNCTION DECLARATIONS
void die(const char *fmt, ...);
void decode_index(void);
void *decode_block_start(off_t block_seek);
void read_file_index(void);
void dump_file_index(void);
void free_file_index(void);