Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
decompress_unlzma.c File Reference
#include <linux/decompress/unlzma.h>
#include <linux/decompress/mm.h>
#include <linux/compiler.h>

Go to the source code of this file.

Data Structures

struct  rc
 
struct  lzma_header
 
struct  writer
 
struct  cstate
 

Macros

#define MIN(a, b)   (((a) < (b)) ? (a) : (b))
 
#define ENDIAN_CONVERT(x)   x = (typeof(x))read_int((unsigned char *)&x, sizeof(x))
 
#define LZMA_IOBUF_SIZE   0x10000
 
#define RC_TOP_BITS   24
 
#define RC_MOVE_BITS   5
 
#define RC_MODEL_TOTAL_BITS   11
 
#define LZMA_BASE_SIZE   1846
 
#define LZMA_LIT_SIZE   768
 
#define LZMA_NUM_POS_BITS_MAX   4
 
#define LZMA_LEN_NUM_LOW_BITS   3
 
#define LZMA_LEN_NUM_MID_BITS   3
 
#define LZMA_LEN_NUM_HIGH_BITS   8
 
#define LZMA_LEN_CHOICE   0
 
#define LZMA_LEN_CHOICE_2   (LZMA_LEN_CHOICE + 1)
 
#define LZMA_LEN_LOW   (LZMA_LEN_CHOICE_2 + 1)
 
#define LZMA_LEN_MID
 
#define LZMA_LEN_HIGH
 
#define LZMA_NUM_LEN_PROBS   (LZMA_LEN_HIGH + (1 << LZMA_LEN_NUM_HIGH_BITS))
 
#define LZMA_NUM_STATES   12
 
#define LZMA_NUM_LIT_STATES   7
 
#define LZMA_START_POS_MODEL_INDEX   4
 
#define LZMA_END_POS_MODEL_INDEX   14
 
#define LZMA_NUM_FULL_DISTANCES   (1 << (LZMA_END_POS_MODEL_INDEX >> 1))
 
#define LZMA_NUM_POS_SLOT_BITS   6
 
#define LZMA_NUM_LEN_TO_POS_STATES   4
 
#define LZMA_NUM_ALIGN_BITS   4
 
#define LZMA_MATCH_MIN_LEN   2
 
#define LZMA_IS_MATCH   0
 
#define LZMA_IS_REP   (LZMA_IS_MATCH + (LZMA_NUM_STATES << LZMA_NUM_POS_BITS_MAX))
 
#define LZMA_IS_REP_G0   (LZMA_IS_REP + LZMA_NUM_STATES)
 
#define LZMA_IS_REP_G1   (LZMA_IS_REP_G0 + LZMA_NUM_STATES)
 
#define LZMA_IS_REP_G2   (LZMA_IS_REP_G1 + LZMA_NUM_STATES)
 
#define LZMA_IS_REP_0_LONG   (LZMA_IS_REP_G2 + LZMA_NUM_STATES)
 
#define LZMA_POS_SLOT
 
#define LZMA_SPEC_POS
 
#define LZMA_ALIGN
 
#define LZMA_LEN_CODER   (LZMA_ALIGN + (1 << LZMA_NUM_ALIGN_BITS))
 
#define LZMA_REP_LEN_CODER   (LZMA_LEN_CODER + LZMA_NUM_LEN_PROBS)
 
#define LZMA_LITERAL   (LZMA_REP_LEN_CODER + LZMA_NUM_LEN_PROBS)
 

Functions

struct lzma_header __attribute__ ((packed))
 
STATIC int INIT unlzma (unsigned char *buf, int in_len, int(*fill)(void *, unsigned int), int(*flush)(void *, unsigned int), unsigned char *output, int *posp, void(*error)(char *x))
 

Variables

uint8_t pos
 
uint32_t dict_size
 
uint64_t dst_size
 
struct writer __attribute__
 

Macro Definition Documentation

#define ENDIAN_CONVERT (   x)    x = (typeof(x))read_int((unsigned char *)&x, sizeof(x))

Definition at line 52 of file decompress_unlzma.c.

#define LZMA_ALIGN
#define LZMA_BASE_SIZE   1846

Definition at line 228 of file decompress_unlzma.c.

#define LZMA_END_POS_MODEL_INDEX   14

Definition at line 250 of file decompress_unlzma.c.

#define LZMA_IOBUF_SIZE   0x10000

Definition at line 65 of file decompress_unlzma.c.

#define LZMA_IS_MATCH   0

Definition at line 260 of file decompress_unlzma.c.

#define LZMA_IS_REP   (LZMA_IS_MATCH + (LZMA_NUM_STATES << LZMA_NUM_POS_BITS_MAX))

Definition at line 261 of file decompress_unlzma.c.

#define LZMA_IS_REP_0_LONG   (LZMA_IS_REP_G2 + LZMA_NUM_STATES)

Definition at line 265 of file decompress_unlzma.c.

#define LZMA_IS_REP_G0   (LZMA_IS_REP + LZMA_NUM_STATES)

Definition at line 262 of file decompress_unlzma.c.

#define LZMA_IS_REP_G1   (LZMA_IS_REP_G0 + LZMA_NUM_STATES)

Definition at line 263 of file decompress_unlzma.c.

#define LZMA_IS_REP_G2   (LZMA_IS_REP_G1 + LZMA_NUM_STATES)

Definition at line 264 of file decompress_unlzma.c.

#define LZMA_LEN_CHOICE   0

Definition at line 237 of file decompress_unlzma.c.

#define LZMA_LEN_CHOICE_2   (LZMA_LEN_CHOICE + 1)

Definition at line 238 of file decompress_unlzma.c.

#define LZMA_LEN_CODER   (LZMA_ALIGN + (1 << LZMA_NUM_ALIGN_BITS))

Definition at line 272 of file decompress_unlzma.c.

#define LZMA_LEN_HIGH
Value:

Definition at line 242 of file decompress_unlzma.c.

#define LZMA_LEN_LOW   (LZMA_LEN_CHOICE_2 + 1)

Definition at line 239 of file decompress_unlzma.c.

#define LZMA_LEN_MID
Value:

Definition at line 240 of file decompress_unlzma.c.

#define LZMA_LEN_NUM_HIGH_BITS   8

Definition at line 235 of file decompress_unlzma.c.

#define LZMA_LEN_NUM_LOW_BITS   3

Definition at line 233 of file decompress_unlzma.c.

#define LZMA_LEN_NUM_MID_BITS   3

Definition at line 234 of file decompress_unlzma.c.

#define LZMA_LIT_SIZE   768

Definition at line 229 of file decompress_unlzma.c.

#define LZMA_LITERAL   (LZMA_REP_LEN_CODER + LZMA_NUM_LEN_PROBS)

Definition at line 274 of file decompress_unlzma.c.

#define LZMA_MATCH_MIN_LEN   2

Definition at line 258 of file decompress_unlzma.c.

#define LZMA_NUM_ALIGN_BITS   4

Definition at line 256 of file decompress_unlzma.c.

#define LZMA_NUM_FULL_DISTANCES   (1 << (LZMA_END_POS_MODEL_INDEX >> 1))

Definition at line 251 of file decompress_unlzma.c.

#define LZMA_NUM_LEN_PROBS   (LZMA_LEN_HIGH + (1 << LZMA_LEN_NUM_HIGH_BITS))

Definition at line 244 of file decompress_unlzma.c.

#define LZMA_NUM_LEN_TO_POS_STATES   4

Definition at line 254 of file decompress_unlzma.c.

#define LZMA_NUM_LIT_STATES   7

Definition at line 247 of file decompress_unlzma.c.

#define LZMA_NUM_POS_BITS_MAX   4

Definition at line 231 of file decompress_unlzma.c.

#define LZMA_NUM_POS_SLOT_BITS   6

Definition at line 253 of file decompress_unlzma.c.

#define LZMA_NUM_STATES   12

Definition at line 246 of file decompress_unlzma.c.

#define LZMA_POS_SLOT
Value:

Definition at line 266 of file decompress_unlzma.c.

#define LZMA_REP_LEN_CODER   (LZMA_LEN_CODER + LZMA_NUM_LEN_PROBS)

Definition at line 273 of file decompress_unlzma.c.

#define LZMA_SPEC_POS
#define LZMA_START_POS_MODEL_INDEX   4

Definition at line 249 of file decompress_unlzma.c.

#define MIN (   a,
  b 
)    (((a) < (b)) ? (a) : (b))

Definition at line 40 of file decompress_unlzma.c.

#define RC_MODEL_TOTAL_BITS   11

Definition at line 82 of file decompress_unlzma.c.

#define RC_MOVE_BITS   5

Definition at line 81 of file decompress_unlzma.c.

#define RC_TOP_BITS   24

Definition at line 80 of file decompress_unlzma.c.

Function Documentation

struct lzma_header __attribute__ ( (packed)  )
read

mcontroller : adapter info structure for old mimd_t apps

: base address : irq number : number of logical drives : pci bus : pci device : pci function : pci id : vendor id : slot number : unique id

Definition at line 171 of file esd_usb2.c.

STATIC int INIT unlzma ( unsigned char buf,
int  in_len,
int(*)(void *, unsigned int fill,
int(*)(void *, unsigned int flush,
unsigned char output,
int posp,
void(*)(char *x error 
)
inline

Definition at line 537 of file decompress_unlzma.c.

Variable Documentation

uint32_t dict_size

Definition at line 227 of file decompress_unlzma.c.

uint64_t dst_size

Definition at line 228 of file decompress_unlzma.c.

uint8_t pos

Definition at line 226 of file decompress_unlzma.c.