summaryrefslogtreecommitdiff
path: root/Userland/Utilities/gunzip.cpp
AgeCommit message (Collapse)Author
2023-04-01gunzip+LibCompress: Move utility to decompress files to GzipDecompressorTimothy Flynn
This is to allow re-using this method (and any optimization it receives) by other utilities, like gzip.
2023-03-31gunzip+LibCompress: Increase buffer sizes used by Deflate and gunzipTimothy Flynn
Co-authored-by: Andreas Kling <kling@serenityos.org>
2023-03-29gunzip: Use a buffered file to read from the input fileTimothy Flynn
2023-03-13AK: Rename Stream::write_entire_buffer to Stream::write_until_depletedTim Schumacher
No functional changes.
2023-03-13AK: Rename Stream::{read,write} to Stream::{read_some,write_some}Tim Schumacher
Similar to POSIX read, the basic read and write functions of AK::Stream do not have a lower limit of how much data they read or write (apart from "none at all"). Rename the functions to "read some [data]" and "write some [data]" (with "data" being omitted, since everything here is reading and writing data) to make them sufficiently distinct from the functions that ensure to use the entire buffer (which should be the go-to function for most usages). No functional changes, just a lot of new FIXMEs.
2023-02-13Everywhere: Remove the `AK::` qualifier from Stream usagesTim Schumacher
2023-02-13LibCore: Move Stream-based file into the `Core` namespaceTim Schumacher
2023-01-29AK: Move `Stream` and `SeekableStream` from `LibCore`Tim Schumacher
`Stream` will be qualified as `AK::Stream` until we remove the `Core::Stream` namespace. `IODevice` now reuses the `SeekMode` that is defined by `SeekableStream`, since defining its own would require us to qualify it with `AK::SeekMode` everywhere.
2023-01-20gunzip: Use `Core::Stream` to write the decompression outputTim Schumacher
2022-12-10LibCompress: Port GzipDecompressor to `Core::Stream`Tim Schumacher
2022-12-06AK+Everywhere: Rename String to DeprecatedStringLinus Groh
We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
2022-07-12Everywhere: Add sv suffix to strings relying on StringView(char const*)sin-ack
Each of these strings would previously rely on StringView's char const* constructor overload, which would call __builtin_strlen on the string. Since we now have operator ""sv, we can replace these with much simpler versions. This opens the door to being able to remove StringView(char const*). No functional changes.
2022-04-01Everywhere: Run clang-formatIdan Horowitz
2022-01-23gunzip: Don't truncate output filename when input file suffix is omittedRummskartoffel
Before this commit, `$ gunzip abcd` would incorrectly uncompress `abcd.gz` to `a` instead of to `abcd`.
2022-01-14gunzip: Remove StringView assignment on rhs-valueLucas CHOLLET
2022-01-14gunzip: Port to LibMainLucas CHOLLET
2021-11-26Userland: Use Core::ArgsParser's Vector<StringView> API everywhereAndreas Kling
...and remove the Vector<String> variant since there are no remaining users of this API.
2021-04-29Utilities: Use Vector<String> positional arguments in some placesAndreas Kling
There are more places we can use these, I just picked some that felt like they improved the code.
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-03-26gunzip: Fail gracefully on bad inputIdan Horowitz
Instead of crashing on a missing input file, looping forever on an invalid gzip compressed file, and crashing on permissions issues in the output file, handle all issues gracefully by logging and returning.
2021-03-12Everywhere: Remove klog(), dbg() and purge all LogStream usage :^)Andreas Kling
Good-bye LogStream. Long live AK::Format!
2021-02-23Everywhere: Rename ASSERT => VERIFYAndreas Kling
(...and ASSERT_NOT_REACHED => VERIFY_NOT_REACHED) Since all of these checks are done in release builds as well, let's rename them to VERIFY to prevent confusion, as everyone is used to assertions being compiled out in release. We can introduce a new ASSERT macro that is specifically for debug checks, but I'm doing this wholesale conversion first since we've accumulated thousands of these already, and it's not immediately obvious which ones are suitable for ASSERT.
2021-01-16Everywhere: Convert a handful of String::format() => formatted()Andreas Kling
2021-01-12Userland: Move command-line utilities to Userland/Utilities/Andreas Kling