coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <commonlib/bsd/compression.h>
#include <commonlib/bsd/helpers.h>
#include <commonlib/bsd/sysincludes.h>
#include <stdint.h>
#include <string.h>
#include "lz4.c.inc"
Go to the source code of this file.
Data Structures | |
struct | lz4_frame_header |
struct | lz4_block_header |
Macros | |
#define | FORCE_INLINE static __always_inline |
#define | likely(expr) __builtin_expect((expr) != 0, 1) |
#define | unlikely(expr) __builtin_expect((expr) != 0, 0) |
#define | LZ4F_MAGICNUMBER 0x184D2204 |
#define | RESERVED0 0x03 |
#define | HAS_CONTENT_CHECKSUM 0x04 |
#define | HAS_CONTENT_SIZE 0x08 |
#define | HAS_BLOCK_CHECKSUM 0x10 |
#define | INDEPENDENT_BLOCKS 0x20 |
#define | VERSION 0xC0 |
#define | VERSION_SHIFT 6 |
#define | RESERVED1_2 0x8F |
#define | MAX_BLOCK_SIZE 0x70 |
#define | BH_SIZE 0x7FFFFFFF |
#define | NOT_COMPRESSED 0x80000000 |
Typedefs | |
typedef uint8_t | BYTE |
typedef uint16_t | U16 |
typedef uint32_t | U32 |
typedef int32_t | S32 |
typedef uint64_t | U64 |
Functions | |
static uint16_t | LZ4_readLE16 (const void *src) |
static void | LZ4_copy8 (void *dst, const void *src) |
size_t | ulz4fn (const void *src, size_t srcn, void *dst, size_t dstn) |
size_t | ulz4f (const void *src, void *dst) |
Variables | |
struct lz4_frame_header | __packed |
#define BH_SIZE 0x7FFFFFFF |
Definition at line 87 of file lz4_wrapper.c.
#define FORCE_INLINE static __always_inline |
Definition at line 57 of file lz4_wrapper.c.
#define HAS_BLOCK_CHECKSUM 0x10 |
Definition at line 71 of file lz4_wrapper.c.
#define HAS_CONTENT_CHECKSUM 0x04 |
Definition at line 69 of file lz4_wrapper.c.
#define HAS_CONTENT_SIZE 0x08 |
Definition at line 70 of file lz4_wrapper.c.
#define INDEPENDENT_BLOCKS 0x20 |
Definition at line 72 of file lz4_wrapper.c.
#define likely | ( | expr | ) | __builtin_expect((expr) != 0, 1) |
Definition at line 58 of file lz4_wrapper.c.
#define LZ4F_MAGICNUMBER 0x184D2204 |
Definition at line 64 of file lz4_wrapper.c.
#define MAX_BLOCK_SIZE 0x70 |
Definition at line 77 of file lz4_wrapper.c.
#define NOT_COMPRESSED 0x80000000 |
Definition at line 88 of file lz4_wrapper.c.
#define RESERVED0 0x03 |
Definition at line 68 of file lz4_wrapper.c.
#define RESERVED1_2 0x8F |
Definition at line 76 of file lz4_wrapper.c.
#define unlikely | ( | expr | ) | __builtin_expect((expr) != 0, 0) |
Definition at line 59 of file lz4_wrapper.c.
#define VERSION 0xC0 |
Definition at line 73 of file lz4_wrapper.c.
#define VERSION_SHIFT 6 |
Definition at line 74 of file lz4_wrapper.c.
Definition at line 51 of file lz4_wrapper.c.
Definition at line 54 of file lz4_wrapper.c.
Definition at line 52 of file lz4_wrapper.c.
Definition at line 53 of file lz4_wrapper.c.
Definition at line 55 of file lz4_wrapper.c.
Definition at line 17 of file lz4_wrapper.c.
Definition at line 13 of file lz4_wrapper.c.
References le16toh().
Definition at line 167 of file lz4_wrapper.c.
Referenced by main().
Definition at line 96 of file lz4_wrapper.c.
References BH_SIZE, lz4_frame_header::block_descriptor, lz4_frame_header::flags, HAS_BLOCK_CHECKSUM, HAS_CONTENT_SIZE, INDEPENDENT_BLOCKS, le32toh(), LZ4F_MAGICNUMBER, lz4_frame_header::magic, memcpy(), MIN, NOT_COMPRESSED, NULL, lz4_block_header::raw, RESERVED0, RESERVED1_2, VERSION, and VERSION_SHIFT.
Referenced by cbfs_load_and_decompress(), decompress_kernel_header(), extract(), load_one_segment(), and ulz4f().
struct lz4_block_header __packed |