AnimaEngine  1.0.0
Nintendo DS Pokemon Black, White, Black 2, and White 2 sprite extraction and preview toolchain
lz.h
Go to the documentation of this file.
1 
6 #ifndef LZ_H
7 #define LZ_H
8 
9 #include "common.h"
10 
14 typedef enum CompressionType {
20 
27 CompressionType Lz_Detect(const u8 *data, size_t size);
28 
34 const char *Lz_CompressionName(CompressionType type);
35 
45 int Lz_Decompress(
46  const u8 *in_data,
47  size_t in_size,
48  u8 **out_data,
49  size_t *out_size,
50  CompressionType *out_type
51 );
52 
53 #endif
Common types, macros, and standard library includes used throughout AnimaEngine.
unsigned char u8
Definition: common.h:14
CompressionType Lz_Detect(const u8 *data, size_t size)
Auto-detects the compression format of a data buffer by inspecting its header byte.
Definition: lz.c:8
int Lz_Decompress(const u8 *in_data, size_t in_size, u8 **out_data, size_t *out_size, CompressionType *out_type)
Decompresses an LZ10 or LZ11 compressed data stream.
Definition: lz.c:270
const char * Lz_CompressionName(CompressionType type)
Returns a human-readable name string for a CompressionType enum.
Definition: lz.c:25
CompressionType
Categorization of compression headers found in NDS/Nitro file formats.
Definition: lz.h:14
@ COMPRESSION_LZ10
Definition: lz.h:16
@ COMPRESSION_NONE
Definition: lz.h:15
@ COMPRESSION_LZ11
Definition: lz.h:17
@ COMPRESSION_UNKNOWN
Definition: lz.h:18