OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
lzvn.c File Reference
#include "lzvn.h"

Go to the source code of this file.

Data Structures

struct  lzvn_decoder_state
 

Macros

#define assert(x)
 
#define LZFSE_INLINE   static inline __attribute__((__always_inline__))
 
#define HAVE_LABELS_AS_VALUES   0
 
#define PTR_LEN_INC(_pointer, _length, _increment)
 
#define UPDATE_GOOD    (state->src = src_ptr, state->dst = dst_ptr, state->d_prev = D)
 

Typedefs

typedef int32_t lzvn_offset
 

Functions

LZFSE_INLINE uint16_t load2 (const void *ptr)
 
LZFSE_INLINE uint32_t load4 (const void *ptr)
 
LZFSE_INLINE uint64_t load8 (const void *ptr)
 
LZFSE_INLINE void store4 (void *ptr, uint32_t data)
 
LZFSE_INLINE void store8 (void *ptr, uint64_t data)
 
LZFSE_INLINE uintmax_t extract (uintmax_t container, unsigned lsb, unsigned width)
 
void lzvn_decode (lzvn_decoder_state *state)
 
size_t lzvn_decode_buffer (unsigned char *dst, size_t dst_size, const unsigned char *src, size_t src_size)
 

Macro Definition Documentation

◆ assert

#define assert ( x)
Value:
do { } while (0)

Definition at line 27 of file lzvn.c.

◆ HAVE_LABELS_AS_VALUES

#define HAVE_LABELS_AS_VALUES   0

Definition at line 124 of file lzvn.c.

◆ LZFSE_INLINE

#define LZFSE_INLINE   static inline __attribute__((__always_inline__))

Definition at line 36 of file lzvn.c.

◆ PTR_LEN_INC

#define PTR_LEN_INC ( _pointer,
_length,
_increment )
Value:
(_pointer += _increment, _length -= _increment)

Definition at line 133 of file lzvn.c.

◆ UPDATE_GOOD

#define UPDATE_GOOD    (state->src = src_ptr, state->dst = dst_ptr, state->d_prev = D)

Definition at line 138 of file lzvn.c.

Typedef Documentation

◆ lzvn_offset

@abstract Signed offset in buffers, stored on either 32 or 64 bits.

Definition at line 43 of file lzvn.c.

Function Documentation

◆ extract()

LZFSE_INLINE uintmax_t extract ( uintmax_t container,
unsigned lsb,
unsigned width )

@abstract Extracts width bits from container, starting with lsb; if we view container as a bit array, we extract container[lsb:lsb+width].

Definition at line 109 of file lzvn.c.

◆ load2()

LZFSE_INLINE uint16_t load2 ( const void * ptr)

@abstract Load bytes from memory location SRC.

Definition at line 80 of file lzvn.c.

◆ load4()

LZFSE_INLINE uint32_t load4 ( const void * ptr)

Definition at line 86 of file lzvn.c.

◆ load8()

LZFSE_INLINE uint64_t load8 ( const void * ptr)

Definition at line 92 of file lzvn.c.

◆ lzvn_decode()

void lzvn_decode ( lzvn_decoder_state * state)

@abstract Decode source to destination. Updates state (src,dst,d_prev).

Definition at line 143 of file lzvn.c.

◆ lzvn_decode_buffer()

size_t lzvn_decode_buffer ( unsigned char * dst,
size_t dst_size,
const unsigned char * src,
size_t src_size )

Definition at line 820 of file lzvn.c.

◆ store4()

LZFSE_INLINE void store4 ( void * ptr,
uint32_t data )

@abstract Store bytes to memory location DST.

Definition at line 99 of file lzvn.c.

◆ store8()

LZFSE_INLINE void store8 ( void * ptr,
uint64_t data )

Definition at line 103 of file lzvn.c.