summaryrefslogtreecommitdiff
path: root/Userland/unzip.cpp
AgeCommit message (Collapse)Author
2020-10-01Userland: Fix buffer overflow in unzipTibor Nagy
It's not a great idea reading file names into a 4 byte sized buffer.
2020-08-16AK: Rename KB, MB, GB to KiB, MiB, GiBNico Weber
The SI prefixes "k", "M", "G" mean "10^3", "10^6", "10^9". The IEC prefixes "Ki", "Mi", "Gi" mean "2^10", "2^20", "2^30". Let's use the correct name, at least in code. Only changes the name of the constants, no other behavior change.
2020-08-12Userland: Mark compilation-unit-only functions as staticBen Wiederhake
This enables a nice warning in case a function becomes dead code.
2020-07-31Userland: Add missing checks for MappedFile.is_valid()Ben Wiederhake
2020-07-14unzip: Correct compression method offset valueAnotherTest
2020-07-13unzip: Remove some magic numbers and create directories when neededAnotherTest
This commit also adds an assert about the compression method instead of just writing out the compressed data.
2020-07-13unzip: mmap() the zip file if possible to avoid spamming syscallsAnotherTest
This patch makes `unzip' mmap the zip file instead of seeking the file repeatedly. This makes unzipping big files bearable, and unzipping huge files impossible. The later could be fixed by mapping/unmapping chunks on the fly once we have support for mmap() offsets.
2020-05-09Userland: Add unzip commandAndres Vieira
The unzip command will unzip a zip file passed as an argument into the current pwd, with the syntax: unzip file.zip This implementation is pretty barebones as it does not support things like file access times, compression or even compression detection, so if the user tries to unzip a compressed zip most probably he would find wrong data inside the files. However it's an starting point :^)