diff options
| author | spicyjpeg <thatspicyjpeg@gmail.com> | 2023-04-05 01:30:55 +0200 |
|---|---|---|
| committer | spicyjpeg <thatspicyjpeg@gmail.com> | 2023-04-05 01:30:55 +0200 |
| commit | b4242acc35c522bd4d4a951a84933ba6f80d2015 (patch) | |
| tree | 02cdff7a11329a7445baae489dd2b38225b12d96 /libpsn00b/include/lzp | |
| parent | 651415f5b549b363dec971e2ef589cce098ee1f2 (diff) | |
| download | psn00bsdk-b4242acc35c522bd4d4a951a84933ba6f80d2015.tar.gz | |
Clean up all headers, add and rename some BIOS APIs
Diffstat (limited to 'libpsn00b/include/lzp')
| -rw-r--r-- | libpsn00b/include/lzp/lzp.h | 34 | ||||
| -rw-r--r-- | libpsn00b/include/lzp/lzqlp.h | 32 |
2 files changed, 49 insertions, 17 deletions
diff --git a/libpsn00b/include/lzp/lzp.h b/libpsn00b/include/lzp/lzp.h index 456de02..1aeea30 100644 --- a/libpsn00b/include/lzp/lzp.h +++ b/libpsn00b/include/lzp/lzp.h @@ -1,20 +1,29 @@ -/*! \file lzp.h - * \brief Main library header +/* + * liblzp data compression library + * (C) 2019 Lameguy64 - MPL licensed */ -/*! \mainpage - * \version 0.20b - * \author John Wilbert 'Lameguy64' Villamor +/** + * @file lzp.h + * @brief Utility library for file bundling and compression * - * \section creditsSection Credits - * - LZ77 data compression/decompression routines based from Ilya Muravyov's - * crush.cpp released under public domain. Refined and ported to C by Lameguy64. - * - CRC calculation routines based from Lammert Bies' lib_crc routines. + * @details This library implements a simple in-memory archive format which + * can be used to package and compress assets for faster loading, as well as a + * generic LZ77 compressor and matching decompressor. Two archive formats are + * supported, one uncompressed (.QLP) and one with individually compressed + * entries (.LZP). * + * This header provides the LZ77 compression API and functions to parse and + * decompress .LZP archives after they have been loaded into memory. + * + * @section creditsSection Credits + * - LZ77 data compression/decompression routines based from Ilya Muravyov's + * crush.cpp released under public domain. Refined and ported to C by + * Lameguy64. + * - CRC calculation routines based from Lammert Bies' lib_crc routines. */ -#ifndef _LZPACK_H -#define _LZPACK_H +#pragma once #include <stdint.h> #ifdef _WIN32 @@ -218,6 +227,3 @@ int lzpUnpackFile(void* buff, const LZP_HEAD* lzpack, int fileNum); #ifdef __cplusplus } #endif - - -#endif // _LZPACK_H diff --git a/libpsn00b/include/lzp/lzqlp.h b/libpsn00b/include/lzp/lzqlp.h index 32ce0d7..127f263 100644 --- a/libpsn00b/include/lzp/lzqlp.h +++ b/libpsn00b/include/lzp/lzqlp.h @@ -1,5 +1,23 @@ -#ifndef _QLP_H -#define _QLP_H +/* + * liblzp data compression library + * (C) 2019 Lameguy64 - MPL licensed + */ + +/** + * @file lzqlp.h + * @brief Utility library for file bundling + * + * @details This library implements a simple in-memory archive format which + * can be used to package and compress assets for faster loading, as well as a + * generic LZ77 compressor and matching decompressor. Two archive formats are + * supported, one uncompressed (.QLP) and one with individually compressed + * entries (.LZP). + * + * This header provides functions to parse .QLP archives and retrieve pointers + * to their contents after they have been loaded into memory. + */ + +#pragma once #include <stdint.h> #ifdef _WIN32 @@ -23,9 +41,17 @@ typedef struct { uint32_t offs; } QLP_FILE; + +// Function prototypes +#ifdef __cplusplus +extern "C" { +#endif + int qlpFileCount(const QLP_HEAD* qlpfile); const QLP_FILE* qlpFileEntry(int index, const QLP_HEAD* qlpfile); const void* qlpFileAddr(int index, const QLP_HEAD* qlpfile); int qlpFindFile(char* fileName, const QLP_HEAD* qlpfile); -#endif // _QLP_H
\ No newline at end of file +#ifdef __cplusplus +} +#endif |
