RetroArch
Macros | Enumerations | Functions
Lzma2Dec.c File Reference
#include <stdint.h>
#include <string.h>
#include "Lzma2Dec.h"
Include dependency graph for Lzma2Dec.c:

Macros

#define LZMA2_CONTROL_LZMA   (1 << 7)
 
#define LZMA2_CONTROL_COPY_NO_RESET   2
 
#define LZMA2_CONTROL_COPY_RESET_DIC   1
 
#define LZMA2_CONTROL_EOF   0
 
#define LZMA2_IS_UNCOMPRESSED_STATE(p)   (((p)->control & LZMA2_CONTROL_LZMA) == 0)
 
#define LZMA2_GET_LZMA_MODE(p)   (((p)->control >> 5) & 3)
 
#define LZMA2_IS_THERE_PROP(mode)   ((mode) >= 2)
 
#define LZMA2_LCLP_MAX   4
 
#define LZMA2_DIC_SIZE_FROM_PROP(p)   (((uint32_t)2 | ((p) & 1)) << ((p) / 2 + 11))
 
#define PRF(x)
 

Enumerations

enum  ELzma2State {
  LZMA2_STATE_CONTROL, LZMA2_STATE_UNPACK0, LZMA2_STATE_UNPACK1, LZMA2_STATE_PACK0,
  LZMA2_STATE_PACK1, LZMA2_STATE_PROP, LZMA2_STATE_DATA, LZMA2_STATE_DATA_CONT,
  LZMA2_STATE_FINISHED, LZMA2_STATE_ERROR
}
 

Functions

static SRes Lzma2Dec_GetOldProps (uint8_t prop, uint8_t *props)
 
SRes Lzma2Dec_AllocateProbs (CLzma2Dec *p, uint8_t prop, ISzAlloc *alloc)
 
SRes Lzma2Dec_Allocate (CLzma2Dec *p, uint8_t prop, ISzAlloc *alloc)
 
void Lzma2Dec_Init (CLzma2Dec *p)
 
static ELzma2State Lzma2Dec_UpdateState (CLzma2Dec *p, uint8_t b)
 
static void LzmaDec_UpdateWithUncompressed (CLzmaDec *p, const uint8_t *src, size_t size)
 
void LzmaDec_InitDicAndState (CLzmaDec *p, bool initDic, bool initState)
 
SRes Lzma2Dec_DecodeToDic (CLzma2Dec *p, size_t dicLimit, const uint8_t *src, size_t *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status)
 
SRes Lzma2Dec_DecodeToBuf (CLzma2Dec *p, uint8_t *dest, size_t *destLen, const uint8_t *src, size_t *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status)
 
SRes Lzma2Decode (uint8_t *dest, size_t *destLen, const uint8_t *src, size_t *srcLen, uint8_t prop, ELzmaFinishMode finishMode, ELzmaStatus *status, ISzAlloc *alloc)
 

Macro Definition Documentation

◆ LZMA2_CONTROL_COPY_NO_RESET

#define LZMA2_CONTROL_COPY_NO_RESET   2

◆ LZMA2_CONTROL_COPY_RESET_DIC

#define LZMA2_CONTROL_COPY_RESET_DIC   1

◆ LZMA2_CONTROL_EOF

#define LZMA2_CONTROL_EOF   0

◆ LZMA2_CONTROL_LZMA

#define LZMA2_CONTROL_LZMA   (1 << 7)

◆ LZMA2_DIC_SIZE_FROM_PROP

#define LZMA2_DIC_SIZE_FROM_PROP (   p)    (((uint32_t)2 | ((p) & 1)) << ((p) / 2 + 11))

◆ LZMA2_GET_LZMA_MODE

#define LZMA2_GET_LZMA_MODE (   p)    (((p)->control >> 5) & 3)

◆ LZMA2_IS_THERE_PROP

#define LZMA2_IS_THERE_PROP (   mode)    ((mode) >= 2)

◆ LZMA2_IS_UNCOMPRESSED_STATE

#define LZMA2_IS_UNCOMPRESSED_STATE (   p)    (((p)->control & LZMA2_CONTROL_LZMA) == 0)

◆ LZMA2_LCLP_MAX

#define LZMA2_LCLP_MAX   4

◆ PRF

#define PRF (   x)

Enumeration Type Documentation

◆ ELzma2State

Enumerator
LZMA2_STATE_CONTROL 
LZMA2_STATE_UNPACK0 
LZMA2_STATE_UNPACK1 
LZMA2_STATE_PACK0 
LZMA2_STATE_PACK1 
LZMA2_STATE_PROP 
LZMA2_STATE_DATA 
LZMA2_STATE_DATA_CONT 
LZMA2_STATE_FINISHED 
LZMA2_STATE_ERROR 

Function Documentation

◆ Lzma2Dec_Allocate()

SRes Lzma2Dec_Allocate ( CLzma2Dec p,
uint8_t  prop,
ISzAlloc alloc 
)
Here is the call graph for this function:

◆ Lzma2Dec_AllocateProbs()

SRes Lzma2Dec_AllocateProbs ( CLzma2Dec p,
uint8_t  prop,
ISzAlloc alloc 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Lzma2Dec_DecodeToBuf()

SRes Lzma2Dec_DecodeToBuf ( CLzma2Dec p,
uint8_t dest,
size_t *  destLen,
const uint8_t src,
size_t *  srcLen,
ELzmaFinishMode  finishMode,
ELzmaStatus status 
)
Here is the call graph for this function:

◆ Lzma2Dec_DecodeToDic()

SRes Lzma2Dec_DecodeToDic ( CLzma2Dec p,
size_t  dicLimit,
const uint8_t src,
size_t *  srcLen,
ELzmaFinishMode  finishMode,
ELzmaStatus status 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Lzma2Dec_GetOldProps()

static SRes Lzma2Dec_GetOldProps ( uint8_t  prop,
uint8_t props 
)
static
Here is the caller graph for this function:

◆ Lzma2Dec_Init()

void Lzma2Dec_Init ( CLzma2Dec p)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Lzma2Dec_UpdateState()

static ELzma2State Lzma2Dec_UpdateState ( CLzma2Dec p,
uint8_t  b 
)
static
Here is the caller graph for this function:

◆ Lzma2Decode()

SRes Lzma2Decode ( uint8_t dest,
size_t *  destLen,
const uint8_t src,
size_t *  srcLen,
uint8_t  prop,
ELzmaFinishMode  finishMode,
ELzmaStatus status,
ISzAlloc alloc 
)
Here is the call graph for this function:

◆ LzmaDec_InitDicAndState()

void LzmaDec_InitDicAndState ( CLzmaDec p,
bool  initDic,
bool  initState 
)
Here is the caller graph for this function:

◆ LzmaDec_UpdateWithUncompressed()

static void LzmaDec_UpdateWithUncompressed ( CLzmaDec p,
const uint8_t src,
size_t  size 
)
static
Here is the call graph for this function:
Here is the caller graph for this function: