compress: Rename modified tinfgzip wrapper to gzip
diff --git a/common/compress/tinfgzip.c b/common/compress/gzip.c
similarity index 95%
rename from common/compress/tinfgzip.c
rename to common/compress/gzip.c
index 67776660..93703611 100644
--- a/common/compress/tinfgzip.c
+++ b/common/compress/gzip.c
@@ -1,5 +1,5 @@
/*
- * tinfgzip - tiny gzip decompressor
+ * originally from tinfgzip - tiny gzip decompressor
*
* Copyright (c) 2003-2019 Joergen Ibsen
* Copyright (c) 2023 mintsuki and contributors to the Limine project
@@ -33,9 +33,9 @@ typedef enum {
FEXTRA = 4,
FNAME = 8,
FCOMMENT = 16
-} tinf_gzip_flag;
+} gzip_flag;
-void *tinf_gzip_uncompress(const void *source, uint64_t sourceLen, uint64_t *outsize) {
+void *gzip_uncompress(const void *source, uint64_t sourceLen, uint64_t *outsize) {
const uint8_t *src = (const uint8_t *) source;
const uint8_t *start;
int res;
diff --git a/common/compress/gzip.h b/common/compress/gzip.h
new file mode 100644
index 00000000..ce9e6a24
--- /dev/null
+++ b/common/compress/gzip.h
@@ -0,0 +1,8 @@
+#ifndef __COMPRESS__GZIP_H__
+#define __COMPRESS__GZIP_H__
+
+#include <stdint.h>
+
+void *gzip_uncompress(const void *source, uint64_t sourceLen, uint64_t *outsize);
+
+#endif
diff --git a/common/compress/tinfgzip.h b/common/compress/tinfgzip.h
deleted file mode 100644
index ef916c53..00000000
--- a/common/compress/tinfgzip.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef __COMPRESS__TINFGZIP_H__
-#define __COMPRESS__TINFGZIP_H__
-
-#include <stdint.h>
-
-void *tinf_gzip_uncompress(const void *source, uint64_t sourceLen, uint64_t *outsize);
-
-#endif
diff --git a/common/lib/uri.c b/common/lib/uri.c
index 2c93d043..a4eed0b5 100644
--- a/common/lib/uri.c
+++ b/common/lib/uri.c
@@ -8,7 +8,7 @@
#include <mm/pmm.h>
#include <lib/print.h>
#include <pxe/tftp.h>
-#include <compress/tinfgzip.h>
+#include <compress/gzip.h>
#include <menu.h>
#include <lib/readline.h>
#include <crypt/blake2b.h>
@@ -273,8 +273,8 @@ struct file_handle *uri_open(char *uri) {
if (compressed && ret != NULL) {
struct file_handle *compressed_fd = ext_mem_alloc(sizeof(struct file_handle));
void *src = freadall(ret, MEMMAP_BOOTLOADER_RECLAIMABLE);
- if ((compressed_fd->fd = tinf_gzip_uncompress(src, ret->size, &compressed_fd->size)) == NULL) {
- panic(true, "tinf error");
+ if ((compressed_fd->fd = gzip_uncompress(src, ret->size, &compressed_fd->size)) == NULL) {
+ panic(true, "GZip error");
}
compressed_fd->vol = ret->vol;
compressed_fd->path = ext_mem_alloc(ret->path_len);
