ReactOS 0.4.15-dev-7924-g5949c20
lz_nonslide.h
Go to the documentation of this file.
1/*
2 File lz_nonslide.h, part of lzxcomp library
3 Copyright (C) 2002 Matthew T. Russotto
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation; version 2.1 only
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17*/
18
19#if defined(_WIN32) || defined(__APPLE__) || defined(__linux__)
20typedef unsigned char u_char;
21#endif
22
23typedef struct lz_info lz_info;
24typedef int (*get_chars_t)(lz_info *lzi, int n, u_char *buf);
25typedef int (*output_match_t)(lz_info *lzi, int match_pos, int match_len);
26typedef void (*output_literal_t)(lz_info *lzi, u_char ch);
27
28struct lz_info
29{
30 int wsize; /* window size in bytes */
31 int max_match; /* size of longest match in bytes */
37 int cur_loc; /* location within stream */
42 int *lentab;
43 short eofcount;
44 short stop;
46
50 void *user_data;
51};
52
53void lz_init(lz_info *lzi, int wsize, int max_dist,
54 int max_match, int min_match,
55 int frame_size,
56 get_chars_t get_chars,
57 output_match_t output_match,
58 output_literal_t output_literal, void *user_data);
59
60void lz_release(lz_info *lzi);
61
62void lz_reset(lz_info *lzi);
64int lz_left_to_process(lz_info *lzi); /* returns # chars read in but unprocessed */
65int lz_compress(lz_info *lzi, int nchars);
UCHAR u_char
Definition: types.h:80
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
GLdouble n
Definition: glext.h:7729
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
void lz_reset(lz_info *lzi)
Definition: lz_nonslide.c:90
int(* get_chars_t)(lz_info *lzi, int n, u_char *buf)
Definition: lz_nonslide.h:24
void lz_release(lz_info *lzi)
Definition: lz_nonslide.c:83
void(* output_literal_t)(lz_info *lzi, u_char ch)
Definition: lz_nonslide.h:26
int lz_compress(lz_info *lzi, int nchars)
Definition: lz_nonslide.c:289
int lz_left_to_process(lz_info *lzi)
Definition: lz_nonslide.c:142
void lz_stop_compressing(lz_info *lzi)
Definition: lz_nonslide.c:283
void lz_init(lz_info *lzi, int wsize, int max_dist, int max_match, int min_match, int frame_size, get_chars_t get_chars, output_match_t output_match, output_literal_t output_literal, void *user_data)
Definition: lz_nonslide.c:42
int(* output_match_t)(lz_info *lzi, int match_pos, int match_len)
Definition: lz_nonslide.h:25
int frame_size
Definition: lz_nonslide.h:39
output_match_t output_match
Definition: lz_nonslide.h:48
int cur_loc
Definition: lz_nonslide.h:37
int chars_in_buf
Definition: lz_nonslide.h:36
int min_match
Definition: lz_nonslide.h:32
output_literal_t output_literal
Definition: lz_nonslide.h:49
short stop
Definition: lz_nonslide.h:44
u_char * block_buf
Definition: lz_nonslide.h:33
int wsize
Definition: lz_nonslide.h:30
short analysis_valid
Definition: lz_nonslide.h:45
void * user_data
Definition: lz_nonslide.h:50
get_chars_t get_chars
Definition: lz_nonslide.h:47
int max_match
Definition: lz_nonslide.h:31
int max_dist
Definition: lz_nonslide.h:40
u_char * block_bufe
Definition: lz_nonslide.h:34
short eofcount
Definition: lz_nonslide.h:43
u_char ** prevtab
Definition: lz_nonslide.h:41
int block_loc
Definition: lz_nonslide.h:38
int block_buf_size
Definition: lz_nonslide.h:35
int * lentab
Definition: lz_nonslide.h:42