summaryrefslogtreecommitdiffhomepage
path: root/Public/Kits/System.Zip
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-03-17 21:38:54 +0100
committerAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-03-17 21:39:15 +0100
commita4bfc396a78ddd553de519ab927d8479d0c3c45d (patch)
tree6ff41607784ee4db226843c1aec6b06d4be5a779 /Public/Kits/System.Zip
parenta8366afaf39321ae2bbae70740f5ca65bee06769 (diff)
unrelated: See below.
Public: Kits: Implemented System API and the concept of object handles. Signed-off-by: Amlal El Mahrouss <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'Public/Kits/System.Zip')
-rw-r--r--Public/Kits/System.Zip/Makefile8
-rw-r--r--Public/Kits/System.Zip/NewFS-Addon.hpp20
-rw-r--r--Public/Kits/System.Zip/Shell.hpp17
-rw-r--r--Public/Kits/System.Zip/Zip.cxx19
-rw-r--r--Public/Kits/System.Zip/Zip.hpp13
5 files changed, 34 insertions, 43 deletions
diff --git a/Public/Kits/System.Zip/Makefile b/Public/Kits/System.Zip/Makefile
index 4423d876..22dcd108 100644
--- a/Public/Kits/System.Zip/Makefile
+++ b/Public/Kits/System.Zip/Makefile
@@ -1,5 +1,5 @@
##################################################
-# ; (C) Mahrouss Logic, 2024, all rights reserved.
+# (C) Mahrouss Logic, 2024, all rights reserved.
# This is the System.Zip Makefile.
##################################################
@@ -9,12 +9,12 @@ ASM=nasm
ASMFLAGS=-f elf64
OUTPUT=System.Zip.dll
-.PHONY: build-zipkit
-build-zipkit:
+.PHONY: build-zip
+build-zip:
$(CC) -I../ -I../../../Private/ $(CCFLAGS) *.cxx -o $(OUTPUT)
.PHONY: all
-all: build-zipkit
+all: build-zip
@echo "[System.Zip.dll] Done."
.PHONY: clean
diff --git a/Public/Kits/System.Zip/NewFS-Addon.hpp b/Public/Kits/System.Zip/NewFS-Addon.hpp
deleted file mode 100644
index 1018bd22..00000000
--- a/Public/Kits/System.Zip/NewFS-Addon.hpp
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * ========================================================
- *
- * h-core
- * Copyright Mahrouss Logic, all rights reserved.
- *
- * ========================================================
- */
-
-#pragma once
-
-/// TODO: integrate NewFS compression.
-
-/// @brief NewFS catalog is compressed.
-#define kNewFSIsZip 255
-
-/// @brief NewFS catalog has password attached to it.
-#define kNewFSHasPassword 256
-
-class ShellInterface;
diff --git a/Public/Kits/System.Zip/Shell.hpp b/Public/Kits/System.Zip/Shell.hpp
new file mode 100644
index 00000000..19de8f07
--- /dev/null
+++ b/Public/Kits/System.Zip/Shell.hpp
@@ -0,0 +1,17 @@
+/* -------------------------------------------
+
+ Copyright Mahrouss Logic
+
+------------------------------------------- */
+
+#pragma once
+
+/// TODO: integrate compression into the shell.
+
+/// @brief NewFS catalog is compressed.
+#define kNewFSIsZip 255
+
+/// @brief NewFS catalog has password attached to it.
+#define kNewFSHasPassword 256
+
+class ShellInterface;
diff --git a/Public/Kits/System.Zip/Zip.cxx b/Public/Kits/System.Zip/Zip.cxx
index 1e4a28cb..8fb7668d 100644
--- a/Public/Kits/System.Zip/Zip.cxx
+++ b/Public/Kits/System.Zip/Zip.cxx
@@ -1,21 +1,18 @@
-/*
- * ========================================================
- *
- * h-core
- * Copyright Mahrouss Logic, all rights reserved.
- *
- * ========================================================
- */
+/* -------------------------------------------
+
+ Copyright Mahrouss Logic
+
+------------------------------------------- */
#include <System.Zip/Zip.hpp>
#include <System.Core/Defs.hxx>
-#define kInitialSz 4096
+#define kZipInitialSize 4096
namespace System::Zip {
ZipStream::ZipStream()
- : fSharedData(System::Heap::Shared()->New(kInitialSz, kHeapExpandable)),
- fSharedSz(kInitialSz) {}
+ : fSharedData(System::Heap::Shared()->New(kZipInitialSize, kHeapExpandable)),
+ fSharedSz(kZipInitialSize) {}
ZipStream::~ZipStream() noexcept {
if (fSharedData) System::Heap::Shared()->Delete(fSharedData);
diff --git a/Public/Kits/System.Zip/Zip.hpp b/Public/Kits/System.Zip/Zip.hpp
index 7affe917..35d7da3a 100644
--- a/Public/Kits/System.Zip/Zip.hpp
+++ b/Public/Kits/System.Zip/Zip.hpp
@@ -1,11 +1,8 @@
-/*
- * ========================================================
- *
- * h-core
- * Copyright Mahrouss Logic, all rights reserved.
- *
- * ========================================================
- */
+/* -------------------------------------------
+
+ Copyright Mahrouss Logic
+
+------------------------------------------- */
#pragma once